From cbe0e497be8e466c380a5b4fa781b314ede9ada3 Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 6 Nov 2016 19:32:27 +1000 Subject: Revert "$ Cleaned up the entire project." This reverts commit 0669f5eb9d5029a8b94ec552171b0837605f7747. # Conflicts: # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java # src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_MassFabricator.java Revert "% Cleaned up Imports." This reverts commit 3654052fb63a571c5eaca7f20714b87c17f7e966. --- .../gregtech/api/gui/CONTAINER_SteamCondenser.java | 172 +++++++++++---------- 1 file changed, 87 insertions(+), 85 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java') 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 82710a799e..3feea9d2df 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SteamCondenser.java @@ -1,95 +1,97 @@ package gtPlusPlus.xmod.gregtech.api.gui; -import java.util.Iterator; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.gui.GT_ContainerMetaTile_Machine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaBoilerBase; + +import java.util.Iterator; + import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -public class CONTAINER_SteamCondenser extends GT_ContainerMetaTile_Machine { - 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; - public CONTAINER_SteamCondenser(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, - final int aSteamCapacity) { - super(aInventoryPlayer, aTileEntity); - this.mSteamCapacity = aSteamCapacity; - } - @Override - public void addSlots(final InventoryPlayer aInventoryPlayer) { - this.addSlotToContainer(new Slot(this.mTileEntity, 2, 116, 62)); - this.addSlotToContainer(new Slot(this.mTileEntity, 0, 44, 26)); - this.addSlotToContainer(new Slot(this.mTileEntity, 1, 44, 62)); - this.addSlotToContainer(new Slot(this.mTileEntity, 3, 116, 26)); - } - @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)); - - 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); - } - } - @Override - public int getShiftClickSlotCount() { - return 1; - } - - @Override - public int getSlotCount() { - return 4; - } - - @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; - } - } +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 +@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; + } + } } \ No newline at end of file -- cgit