diff options
| author | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:23:26 +1000 |
|---|---|---|
| committer | draknyte1 <draknyte1@hotmail.com> | 2016-11-04 15:23:26 +1000 |
| commit | 0669f5eb9d5029a8b94ec552171b0837605f7747 (patch) | |
| tree | 6b40e64c04d51b7a33cf2f0b35f7232cf37c4247 /src/Java/gtPlusPlus/xmod/gregtech/api/gui | |
| parent | 3654052fb63a571c5eaca7f20714b87c17f7e966 (diff) | |
| download | GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.gz GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.tar.bz2 GT5-Unofficial-0669f5eb9d5029a8b94ec552171b0837605f7747.zip | |
$ Cleaned up the entire project.
> Much neat, very nices.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui')
16 files changed, 710 insertions, 655 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java index e286cd9cd6..fc9e9ffcbe 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_DeluxeTank.java @@ -18,57 +18,61 @@ import net.minecraft.inventory.Slot; */ public class CONTAINER_DeluxeTank extends GT_Container_BasicTank { - public int mContent = 0; + public int mContent = 0; - public CONTAINER_DeluxeTank(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } + public CONTAINER_DeluxeTank(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 0, 80, 17)); - addSlotToContainer(new GT_Slot_Output(mTileEntity, 1, 80, 53)); - addSlotToContainer(new GT_Slot_Render(mTileEntity, 2, 41, 42)); - addSlotToContainer(new GT_Slot_Render(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 (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return; - if (((GT_MetaTileEntity_DeluxeTank) mTileEntity.getMetaTileEntity()).mFluid != null) - mContent = ((GT_MetaTileEntity_DeluxeTank) mTileEntity.getMetaTileEntity()).mFluid.amount; - else - mContent = 0; - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, mContent & 65535); - var1.sendProgressBarUpdate(this, 101, mContent >>> 16); - } - } + @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 var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mContent & 65535); + var1.sendProgressBarUpdate(this, 101, this.mContent >>> 16); + } + } - @Override - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - mContent = mContent & -65536 | par2; - break; - case 101: - mContent = mContent & 65535 | par2 << 16; - break; - } - } + @Override + public int getShiftClickSlotCount() { + return 1; + } - @Override - public int getSlotCount() { - return 2; - } + @Override + public int getSlotCount() { + return 2; + } - @Override - public int getShiftClickSlotCount() { - return 1; - } + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(final int par1, final int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mContent = this.mContent & -65536 | par2; + break; + case 101: + this.mContent = this.mContent & 65535 | par2 << 16; + break; + } + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java index 4083875fdb..24a970d360 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IndustrialCentrifuge.java @@ -11,28 +11,30 @@ import net.minecraft.inventory.Slot; * The Container I use for all my Basic Machines */ public class CONTAINER_IndustrialCentrifuge extends GT_ContainerMetaTile_Machine { - - public CONTAINER_IndustrialCentrifuge(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - - super(aInventoryPlayer, aTileEntity); - } - - public CONTAINER_IndustrialCentrifuge(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } - - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 1, 154, 42)); - } - - @Override - public int getSlotCount() { - return 1; - } - - @Override - public int getShiftClickSlotCount() { - return 1; - } + + public CONTAINER_IndustrialCentrifuge(final InventoryPlayer aInventoryPlayer, + final IGregTechTileEntity aTileEntity) { + + super(aInventoryPlayer, aTileEntity); + } + + public CONTAINER_IndustrialCentrifuge(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 getShiftClickSlotCount() { + return 1; + } + + @Override + public int getSlotCount() { + return 1; + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java index 0a19c62d0c..350b4f00f1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_IronBlastFurnace.java @@ -7,25 +7,25 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; public class CONTAINER_IronBlastFurnace extends GT_ContainerMetaTile_Machine { - public CONTAINER_IronBlastFurnace(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } + public CONTAINER_IronBlastFurnace(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); - addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); - addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25)); - addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); - } + @Override + public void addSlots(final InventoryPlayer aInventoryPlayer) { + this.addSlotToContainer(new Slot(this.mTileEntity, 0, 34, 16)); + this.addSlotToContainer(new Slot(this.mTileEntity, 1, 34, 34)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 2, 86, 25)); + this.addSlotToContainer(new GT_Slot_Output(this.mTileEntity, 3, 104, 25)); + } - @Override - public int getSlotCount() { - return 4; - } - - @Override + @Override public int getShiftClickSlotCount() { - return 2; - } + return 2; + } + + @Override + public int getSlotCount() { + return 4; + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java index 1c94298e09..56906c96f0 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MatterFab.java @@ -11,31 +11,27 @@ import net.minecraft.entity.player.InventoryPlayer; * The Container I use for all my Basic Machines */ public class CONTAINER_MatterFab extends GT_ContainerMetaTile_Machine { - - public int mUUA_USED = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getAmplifierUsed(); - public int mUUM_MADE = ((GregtechMetaTileEntity_MassFabricator)this.mTileEntity.getMetaTileEntity()).getMatterProduced(); - - public CONTAINER_MatterFab(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } - public CONTAINER_MatterFab(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } -} + public int mUUA_USED = ((GregtechMetaTileEntity_MassFabricator) this.mTileEntity.getMetaTileEntity()) + .getAmplifierUsed(); + public int mUUM_MADE = ((GregtechMetaTileEntity_MassFabricator) this.mTileEntity.getMetaTileEntity()) + .getMatterProduced(); - /*@Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 1, 152, 5)); - } + public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - @Override - public int getSlotCount() { - return 1; - } + public CONTAINER_MatterFab(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } +} - @Override - public int getShiftClickSlotCount() { - return 0; - } -}*/ +/* + * @Override public void addSlots(InventoryPlayer aInventoryPlayer) { + * addSlotToContainer(new Slot(mTileEntity, 1, 152, 5)); } + * + * @Override public int getSlotCount() { return 1; } + * + * @Override public int getShiftClickSlotCount() { return 0; } } + */ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java index 9e0a7869e5..ce43c02a69 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_MultiMachine.java @@ -10,27 +10,21 @@ import net.minecraft.entity.player.InventoryPlayer; * The Container I use for all my Basic Machines */ public class CONTAINER_MultiMachine extends GT_ContainerMetaTile_Machine { - public CONTAINER_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { - super(aInventoryPlayer, aTileEntity); - } + public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } - public CONTAINER_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, boolean bindInventory) { - super(aInventoryPlayer, aTileEntity, bindInventory); - } + public CONTAINER_MultiMachine(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final boolean bindInventory) { + super(aInventoryPlayer, aTileEntity, bindInventory); + } } - /*@Override - public void addSlots(InventoryPlayer aInventoryPlayer) { - addSlotToContainer(new Slot(mTileEntity, 1, 152, 5)); - } - - @Override - public int getSlotCount() { - return 1; - } - - @Override - public int getShiftClickSlotCount() { - return 0; - } -}*/ +/* + * @Override public void addSlots(InventoryPlayer aInventoryPlayer) { + * addSlotToContainer(new Slot(mTileEntity, 1, 152, 5)); } + * + * @Override public int getSlotCount() { return 1; } + * + * @Override public int getShiftClickSlotCount() { return 0; } } + */ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java index e07e080f0b..0ea825c9c4 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SafeBlock.java @@ -12,111 +12,126 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; -public class CONTAINER_SafeBlock -extends GT_ContainerMetaTile_Machine { - public CONTAINER_SafeBlock(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { +public class CONTAINER_SafeBlock extends GT_ContainerMetaTile_Machine { + // public String UUID = + // ((BaseMetaTileEntity)mTileEntity).getMetaTileEntity().getBaseMetaTileEntity().getOwnerName(); + public UUID ownerUUID = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).ownerUUID; + + public String tempPlayer = PlayerCache.lookupPlayerByUUID(this.ownerUUID); + public boolean blockStatus = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable; + public CONTAINER_SafeBlock(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) { super(aInventoryPlayer, aTileEntity); } - //public String UUID = ((BaseMetaTileEntity)mTileEntity).getMetaTileEntity().getBaseMetaTileEntity().getOwnerName(); - public UUID ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; - public String tempPlayer = PlayerCache.lookupPlayerByUUID(ownerUUID); - public boolean blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; - @Override - public void addSlots(InventoryPlayer aInventoryPlayer) { + public void addSlots(final 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)); + this.addSlotToContainer(new Slot(this.mTileEntity, x + y * 9, 8 + x * 18, 5 + y * 18)); } } - 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)); + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 8, 63, false, true, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 26, 63, false, true, 1)); + this.addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 27, 44, 63, false, true, 1)); + } + + @Override + public int getShiftClickSlotCount() { + return 27; } @Override - public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) { - int runs = 0; + public int getSlotCount() { + return 27; + } + + @Override + public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold, + final EntityPlayer aPlayer) { + final int runs = 0; if (aSlotIndex < 27) { return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } - Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); + final Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex); if (tSlot != null) { if (this.mTileEntity.getMetaTileEntity() == null) { return null; } - if (aSlotIndex == 27) { - - - /*((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput); - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bOutput) { - if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bOutput != false)) { - - Utils.LOG_INFO(String.valueOf(Sys.is64Bit())); - Utils.messagePlayer(aPlayer, "Salmon"); - } - - GT_Utility.sendChatToPlayer(aPlayer, "Emit Energy to Outputside"); - } else { - GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); - } - return null;*/ - - - } - if (aSlotIndex == 28) {} - /* ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); - if (((GregtechMetaSafeBlock) 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) /*{ - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { - if (((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable) { - makeIndestructible(aPlayer); - } - else { + if (aSlotIndex == 27) { - } - } else { - makeIndestructible(aPlayer); - } - return null; - }*/ + /* + * ((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()).bOutput = + * (!((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()).bOutput); if + * (((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()).bOutput) { if (aPlayer + * != null && aPlayer instanceof EntityPlayerMP && + * (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity() + * ).bOutput != false)) { + * + * Utils.LOG_INFO(String.valueOf(Sys.is64Bit())); + * Utils.messagePlayer(aPlayer, "Salmon"); } + * + * GT_Utility.sendChatToPlayer(aPlayer, + * "Emit Energy to Outputside"); } else { + * GT_Utility.sendChatToPlayer(aPlayer, "Don't emit Energy"); } + * return null; + */ + + } + if (aSlotIndex == 28) { + } + /* + * ((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull = + * (!((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()).bRedstoneIfFull); if + * (((GregtechMetaSafeBlock) + * 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) /* + * { if (((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()). + * bUnbreakable) { if + * (((GregtechMetaSafeBlock) + * this.mTileEntity.getMetaTileEntity()). + * bUnbreakable) { + * makeIndestructible(aPlayer); } else { + * + * } } else { makeIndestructible(aPlayer); } + * return null; } + */ { - ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable = (!((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable); - blockStatus = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable; - ownerUUID = ((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).ownerUUID; - //Utils.messagePlayer(aPlayer, "Is the safe locked? "+String.valueOf(((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable).toUpperCase()); - /*if (aPlayer != null && aPlayer instanceof EntityPlayerMP && (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity()).bUnbreakable != false)) { - UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); - Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); - } - else { - UnbreakableBlockManager Xasda = new UnbreakableBlockManager(); - Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, aPlayer); - }*/ + ((GregtechMetaSafeBlock) this.mTileEntity + .getMetaTileEntity()).bUnbreakable = !((GregtechMetaSafeBlock) this.mTileEntity + .getMetaTileEntity()).bUnbreakable; + this.blockStatus = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).bUnbreakable; + this.ownerUUID = ((GregtechMetaSafeBlock) this.mTileEntity.getMetaTileEntity()).ownerUUID; + // Utils.messagePlayer(aPlayer, "Is the safe locked? + // "+String.valueOf(((GregtechMetaSafeBlock) + // this.mTileEntity.getMetaTileEntity()).bUnbreakable).toUpperCase()); + /* + * if (aPlayer != null && aPlayer instanceof EntityPlayerMP && + * (((GregtechMetaSafeBlock)this.mTileEntity.getMetaTileEntity() + * ).bUnbreakable != false)) { UnbreakableBlockManager Xasda = + * new UnbreakableBlockManager(); + * Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, + * aPlayer); } else { UnbreakableBlockManager Xasda = new + * UnbreakableBlockManager(); + * Xasda.setmTileEntity((BaseMetaTileEntity) mTileEntity, + * aPlayer); } + */ return null; } - } return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer); } - @Override - public int getSlotCount() { - return 27; - } - - @Override - public int getShiftClickSlotCount() { - return 27; - } - } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java index 6330249fe4..b70efd4930 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SolarGenerator.java @@ -10,70 +10,80 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileE import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; -public class CONTAINER_SolarGenerator - extends GT_ContainerMetaTile_Machine { - private final int mSteamCapacity; - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - public CONTAINER_SolarGenerator(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aSteamCapacity) { - super(aInventoryPlayer, aTileEntity); - this.mSteamCapacity = aSteamCapacity; - } +public class CONTAINER_SolarGenerator extends GT_ContainerMetaTile_Machine { + private final int mSteamCapacity; + public int mWaterAmount = 0; + public int mSteamAmount = 0; + public int mProcessingEnergy = 0; + public int mTemperature = 2; - 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)); - //addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } + public CONTAINER_SolarGenerator(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, + final int aSteamCapacity) { + super(aInventoryPlayer, aTileEntity); + this.mSteamCapacity = aSteamCapacity; + } - public int getSlotCount() { - return 0; - } + @Override + public void addSlots(final 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)); + // addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); + } - public int getShiftClickSlotCount() { - return 0; - } + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + if (this.mTileEntity.isClientSide() || this.mTileEntity.getMetaTileEntity() == null) { + return; + } + this.mTemperature = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mSolarCharge; + this.mProcessingEnergy = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity + .getMetaTileEntity()).mProcessingEnergy; - public void detectAndSendChanges() { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - this.mTemperature = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mSolarCharge; - this.mProcessingEnergy = ((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - - this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - this.mEnergy = (int) Math.min(Integer.MAX_VALUE, mTileEntity.getStoredEU()); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); + this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 + / (((GregtechMetaTileEntitySolarGenerator) this.mTileEntity.getMetaTileEntity()).maxProgresstime() + - 10))); + this.mEnergy = (int) Math.min(Integer.MAX_VALUE, this.mTileEntity.getStoredEU()); + this.mProcessingEnergy = Math.min(14, + Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) { - ICrafting var1 = (ICrafting) var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } + final Iterator var2 = this.crafters.iterator(); + while (var2.hasNext()) { + final ICrafting var1 = (ICrafting) var2.next(); + var1.sendProgressBarUpdate(this, 100, this.mTemperature); + var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); + var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); + var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); + } + } - @SideOnly(Side.CLIENT) - public void updateProgressBar(int par1, int par2) { - super.updateProgressBar(par1, par2); - switch (par1) { - case 100: - this.mTemperature = par2; - break; - case 101: - this.mProcessingEnergy = par2; - break; - case 102: - this.mSteamAmount = par2; - break; - case 103: - this.mWaterAmount = par2; - } - } + @Override + public int getShiftClickSlotCount() { + return 0; + } + + @Override + public int getSlotCount() { + return 0; + } + + @Override + @SideOnly(Side.CLIENT) + public void updateProgressBar(final int par1, final int par2) { + super.updateProgressBar(par1, par2); + switch (par1) { + case 100: + this.mTemperature = par2; + break; + case 101: + this.mProcessingEnergy = par2; + break; + case 102: + this.mSteamAmount = par2; + break; + case 103: + this.mWaterAmount = par2; + } + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java index 39c32c6b9b..82710a799e 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java @@ -11,86 +11,85 @@ import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; -public class CONTAINER_SteamCondenser extends GT_ContainerMetaTile_Machine -{ - public CONTAINER_SteamCondenser(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aSteamCapacity) - { - super(aInventoryPlayer, aTileEntity); - this.mSteamCapacity = aSteamCapacity; - } - - @Override -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)); - addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - - @Override -public int getSlotCount() - { - return 4; - } - - @Override -public int getShiftClickSlotCount() - { - return 1; - } - - public int mWaterAmount = 0; - public int mSteamAmount = 0; - public int mProcessingEnergy = 0; - public int mTemperature = 2; - private final int mSteamCapacity; - public long mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; - - @Override -public void detectAndSendChanges() - { - super.detectAndSendChanges(); - if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) { - return; - } - this.mTemperature = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mTemperature; - this.mProcessingEnergy = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mProcessingEnergy; - this.mSteamAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mSteam.amount); - this.mWaterAmount = (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid == null ? 0 : ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).mFluid.amount); - this.mTickingTime = ((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).RI; - - this.mTemperature = Math.min(54, Math.max(0, this.mTemperature * 54 / (((GregtechMetaBoilerBase)this.mTileEntity.getMetaTileEntity()).maxProgresstime() - 10))); - this.mSteamAmount = Math.min(54, Math.max(0, this.mSteamAmount * 54 / (this.mSteamCapacity - 100))); - this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterAmount * 54 / 15900)); - this.mProcessingEnergy = Math.min(14, Math.max(this.mProcessingEnergy > 0 ? 1 : 0, this.mProcessingEnergy * 14 / 1000)); - - Iterator var2 = this.crafters.iterator(); - while (var2.hasNext()) - { - ICrafting var1 = (ICrafting)var2.next(); - var1.sendProgressBarUpdate(this, 100, this.mTemperature); - var1.sendProgressBarUpdate(this, 101, this.mProcessingEnergy); - var1.sendProgressBarUpdate(this, 102, this.mSteamAmount); - var1.sendProgressBarUpdate(this, 103, this.mWaterAmount); - } - } - - @Override |
