diff options
author | Shawn Buckley <shawntbuckley@gmail.com> | 2015-10-21 22:06:25 -0400 |
---|---|---|
committer | Shawn Buckley <shawntbuckley@gmail.com> | 2015-10-21 22:06:25 -0400 |
commit | 9353aa711b1d750ff945acdfed2d3b956291b615 (patch) | |
tree | d6ca62ab093dede52afef0d82ac29d32c56fb29b /src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java | |
parent | 445e6c3f25714ecf15c07dcd3462375d65b6dc92 (diff) | |
download | GT5-Unofficial-9353aa711b1d750ff945acdfed2d3b956291b615.tar.gz GT5-Unofficial-9353aa711b1d750ff945acdfed2d3b956291b615.tar.bz2 GT5-Unofficial-9353aa711b1d750ff945acdfed2d3b956291b615.zip |
Reformat code
Diffstat (limited to 'src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java')
-rw-r--r-- | src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java | 127 |
1 files changed, 58 insertions, 69 deletions
diff --git a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java index f2fd7848b6..8cd6e9db54 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java +++ b/src/main/java/gregtech/common/gui/GT_Container_ChestBuffer.java @@ -5,84 +5,73 @@ import gregtech.api.gui.GT_Slot_Holo; import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.automation.GT_MetaTileEntity_ChestBuffer;
-import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
public class GT_Container_ChestBuffer
- extends GT_ContainerMetaTile_Machine
-{
- public GT_Container_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity)
- {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer)
- {
- for (int y = 0; y < 3; y++) {
- for (int x = 0; x < 9; x++) {
- addSlotToContainer(new Slot(this.mTileEntity, x + y * 9, 8 + x * 18, 5 + y * 18));
- }
+ extends GT_ContainerMetaTile_Machine {
+ public GT_Container_ChestBuffer(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
}
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1));
- addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1));
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer)
- {
- if (aSlotIndex < 27) {
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
- Slot tSlot = (Slot)this.inventorySlots.get(aSlotIndex);
- if (tSlot != null)
- {
- if (this.mTileEntity.getMetaTileEntity() == null) {
- return null;
- }
- if (aSlotIndex == 27)
- {
- ((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bOutput);
- if (((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bOutput) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+
+ public void addSlots(InventoryPlayer aInventoryPlayer) {
+ for (int y = 0; y < 3; y++) {
+ for (int x = 0; x < 9; x++) {
+ addSlotToContainer(new Slot(this.mTileEntity, x + y * 9, 8 + x * 18, 5 + y * 18));
+ }
}
- return null;
- }
- if (aSlotIndex == 28)
- {
- ((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
- if (((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
- GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1));
+ }
+
+ public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
+ if (aSlotIndex < 27) {
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
}
- return null;
- }
- if (aSlotIndex == 29)
- {
- ((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bInvert);
- if (((GT_MetaTileEntity_ChestBuffer)this.mTileEntity.getMetaTileEntity()).bInvert) {
- GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
+ if (tSlot != null) {
+ if (this.mTileEntity.getMetaTileEntity() == null) {
+ return null;
+ }
+ if (aSlotIndex == 27) {
+ ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput);
+ if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bOutput) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside");
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy");
+ }
+ return null;
+ }
+ if (aSlotIndex == 28) {
+ ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull);
+ if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Emit Redstone if no Slot is free");
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Redstone");
+ }
+ return null;
+ }
+ if (aSlotIndex == 29) {
+ ((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert = (!((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert);
+ if (((GT_MetaTileEntity_ChestBuffer) this.mTileEntity.getMetaTileEntity()).bInvert) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Invert Redstone");
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, "Don't invert Redstone");
+ }
+ return null;
+ }
}
- return null;
- }
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+
+ public int getSlotCount() {
+ return 27;
+ }
+
+ public int getShiftClickSlotCount() {
+ return 27;
}
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- public int getSlotCount()
- {
- return 27;
- }
-
- public int getShiftClickSlotCount()
- {
- return 27;
- }
}
|