diff options
| author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-08-29 16:04:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-29 16:04:28 +0200 |
| commit | 7d1f51a8937e0a86486267437d444696e81e8aa0 (patch) | |
| tree | a5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/gregtech/api/gui | |
| parent | 5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff) | |
| download | GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2 GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip | |
Buildscript + Spotless (#318)
* Convert AES.java to readable class
* Buildscript
* Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/gui')
68 files changed, 4857 insertions, 4375 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java index 04d8d91201..005485cbde 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_AdvancedBoiler.java @@ -1,32 +1,27 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import java.util.Iterator; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GT_MetaTileEntity_Boiler_Base; +import java.util.Iterator; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; -public class CONTAINER_AdvancedBoiler - extends GT_ContainerMetaTile_Machine { +public class CONTAINER_AdvancedBoiler extends GT_ContainerMetaTile_Machine { public int mWaterAmount = 0; public int mSteamAmount = 0; public int mProcessingEnergy = 0; public int mTemperature = 2; - + public CONTAINER_AdvancedBoiler(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { + public void addSlots(InventoryPlayer aInventoryPlayer) { addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); @@ -34,33 +29,47 @@ public class CONTAINER_AdvancedBoiler } @Override - public int getSlotCount() { + public int getSlotCount() { return 4; } @Override - public int getShiftClickSlotCount() { + public int getShiftClickSlotCount() { return 1; } @Override - public void detectAndSendChanges() { + public void detectAndSendChanges() { super.detectAndSendChanges(); if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { return; } - + int steamCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getSteamCapacity(); int waterCapacity = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).getCapacity(); this.mTemperature = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mTemperature; - this.mProcessingEnergy = ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid.amount); + this.mProcessingEnergy = + ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; + this.mSteamAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam == null + ? 0 + : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mSteam.amount); + this.mWaterAmount = (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid == null + ? 0 + : ((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).mFluid.amount); - this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); + this.mTemperature = Math.min( + 54, + Math.max( + 0, + this.mTemperature + * 54 + / (((GT_MetaTileEntity_Boiler_Base) this.mTileEntity.getMetaTileEntity()) + .maxProgresstime() + - 10))); this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (steamCapacity - 100))); this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / (waterCapacity - 100))); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); + this.mProcessingEnergy = + Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); Iterator<?> var2 = this.crafters.iterator(); while (var2.hasNext()) { @@ -73,7 +82,7 @@ public class CONTAINER_AdvancedBoiler } @Override - @SideOnly(Side.CLIENT) + @SideOnly(Side.CLIENT) public void updateProgressBar(int par1, int par2) { super.updateProgressBar(par1, par2); switch (par1) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java index 6d0eb6b14c..f11a943e44 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Cyclotron.java @@ -11,27 +11,30 @@ import net.minecraft.entity.player.InventoryPlayer; */ public class CONTAINER_Cyclotron extends GT_ContainerMetaTile_Machine { - public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - //this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); - } - - @Override - public int getSlotCount() { - return 0; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } + public CONTAINER_Cyclotron(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_Cyclotron( + final InventoryPlayer aInventoryPlayer, + final IGregTechTileEntity aTileEntity, + final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } + + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + // this.addSlotToContainer(new Slot(this.mTileEntity, 1, 154, 42)); + } + + @Override + public int getSlotCount() { + return 0; + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java index fe100955e0..0951c231d5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DataHatch.java @@ -3,9 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.gui; import gregtech.api.enums.ItemList; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.slots.SlotIntegratedCircuit; -import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; @@ -36,7 +34,6 @@ public class CONTAINER_DataHatch extends GT_ContainerMetaTile_Machine { addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 14, 89, 62)); addSlotToContainer(new GT_Slot_DataOrb(mTileEntity, 15, 107, 62)); addSlotToContainer(new SlotIntegratedCircuit(mTileEntity, 16, 19, 35)); - } @Override @@ -48,23 +45,23 @@ public class CONTAINER_DataHatch extends GT_ContainerMetaTile_Machine { public int getShiftClickSlotCount() { return 0; } - - @Override - public void putStackInSlot(int par1, ItemStack par2ItemStack) { - /*Logger.INFO("Slot: "+par1); - if (par1 < 16 && ItemList.Tool_DataOrb.isStackEqual(par2ItemStack)) { - super.putStackInSlot(par1, par2ItemStack); - } - if (par1 == 16 && ItemUtils.isControlCircuit(par2ItemStack)) { - super.putStackInSlot(par1, par2ItemStack); - }*/ - super.putStackInSlot(par1, par2ItemStack); - } - @Override - public boolean canDragIntoSlot(Slot par1Slot) { - return super.canDragIntoSlot(par1Slot); - } + @Override + public void putStackInSlot(int par1, ItemStack par2ItemStack) { + /*Logger.INFO("Slot: "+par1); + if (par1 < 16 && ItemList.Tool_DataOrb.isStackEqual(par2ItemStack)) { + super.putStackInSlot(par1, par2ItemStack); + } + if (par1 == 16 && ItemUtils.isControlCircuit(par2ItemStack)) { + super.putStackInSlot(par1, par2ItemStack); + }*/ + super.putStackInSlot(par1, par2ItemStack); + } + + @Override + public boolean canDragIntoSlot(Slot par1Slot) { + return super.canDragIntoSlot(par1Slot); + } public class GT_Slot_DataOrb extends Slot { public GT_Slot_DataOrb(IInventory par1iInventory, int par2, int par3, int par4) { @@ -76,7 +73,4 @@ public class CONTAINER_DataHatch extends GT_ContainerMetaTile_Machine { return ItemList.Tool_DataOrb.isStackEqual(aStack, false, true); } } - - - } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java index a4508781aa..e0698f9d24 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java @@ -1,20 +1,16 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import java.util.Iterator; - import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; - -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.ICrafting; -import net.minecraft.inventory.Slot; - import gregtech.api.gui.GT_Container_BasicTank; import gregtech.api.gui.GT_Slot_Output; import gregtech.api.gui.GT_Slot_Render; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; - import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeTank; +import java.util.Iterator; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.Slot; /** * NEVER INCLUDE THIS FILE IN YOUR MOD!!! @@ -23,58 +19,58 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEn */ public class CONTAINER_DeluxeTank extends GT_Container_BasicTank { - public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } + public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); - this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 41, 42)); - this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 3, 59, 42)); - } + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 80, 17)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 1, 80, 53)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 2, 41, 42)); + this.addSlotToContainer(new GT_Slot_Render(this.mTileEntity, 3, 59, 42)); + } - @Override - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if (this.mTileEntity.isClientSide() || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - if (((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid != null) { - this.mContent = ((GT_MetaTileEntity_DeluxeTank) this.mTileEntity.getMetaTileEntity()).mFluid.amount; - } else { - this.mContent = 0; - } - final Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - final ICrafting |
