diff options
author | aerospark <lukefay12@gmail.com> | 2015-06-23 15:29:05 -0700 |
---|---|---|
committer | aerospark <lukefay12@gmail.com> | 2015-06-23 15:29:05 -0700 |
commit | a1504799f44ba2debdfef06317f24e7f9c1129d6 (patch) | |
tree | 53e53ff64d2902c639951bd1d41f942ee171f836 /main/java/gregtech/common/tileentities/boilers | |
parent | b803f59de5a66fcb4ef53e117b912fbbc2841392 (diff) | |
download | GT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.tar.gz GT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.tar.bz2 GT5-Unofficial-a1504799f44ba2debdfef06317f24e7f9c1129d6.zip |
strip linenumbers
Diffstat (limited to 'main/java/gregtech/common/tileentities/boilers')
3 files changed, 480 insertions, 480 deletions
diff --git a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java index 5dee9e7746..35243db699 100644 --- a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java +++ b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -1,163 +1,163 @@ -/* 1: */ package gregtech.common.tileentities.boilers;
-/* 2: */
-/* 3: */ import gregtech.api.enums.Dyes;
-/* 4: */ import gregtech.api.enums.Materials;
-/* 5: */ import gregtech.api.enums.OrePrefixes;
+package gregtech.common.tileentities.boilers;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
-/* 6: */ import gregtech.api.enums.Textures.BlockIcons;
-/* 7: */ import gregtech.api.interfaces.ITexture;
-/* 8: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-/* 9: */ import gregtech.api.metatileentity.MetaTileEntity;
-/* 10: */ import gregtech.api.objects.GT_RenderedTexture;
-/* 11: */ import gregtech.api.util.GT_ModHandler;
-/* 12: */ import gregtech.api.util.GT_OreDictUnificator;
-/* 13: */ import gregtech.common.gui.GT_Container_Boiler;
-/* 14: */ import gregtech.common.gui.GT_GUIContainer_Boiler;
-/* 15: */ import net.minecraft.entity.player.InventoryPlayer;
-/* 16: */ import net.minecraftforge.common.util.ForgeDirection;
-/* 17: */ import net.minecraftforge.fluids.FluidStack;
-/* 18: */ import net.minecraftforge.fluids.IFluidHandler;
-/* 19: */
-/* 20: */ public class GT_MetaTileEntity_Boiler_Lava
-/* 21: */ extends GT_MetaTileEntity_Boiler
-/* 22: */ {
-/* 23: */ public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional)
-/* 24: */ {
-/* 25: 22 */ super(aID, aName, aNameRegional, "A Boiler running off Lava", new ITexture[0]);
-/* 26: */ }
-/* 27: */
-/* 28: */ public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
-/* 29: */ {
-/* 30: 26 */ super(aName, aTier, aDescription, aTextures);
-/* 31: */ }
-/* 32: */
-/* 33: */ public ITexture[][][] getTextureSet(ITexture[] aTextures)
-/* 34: */ {
-/* 35: 31 */ ITexture[][][] rTextures = new ITexture[5][17][];
-/* 36: 32 */ for (byte i = -1; i < 16; i++){
-/* 38: 33 */ rTextures[0][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
-/* 39: 34 */ rTextures[1][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
-/* 40: 35 */ rTextures[2][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
-/* 41: 36 */ rTextures[3][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT) };
-/* 42: 37 */ rTextures[4][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE) };
-/* 43: */ }
-/* 44: 39 */ return rTextures;
-/* 45: */ }
-/* 46: */
-/* 47: */ public int maxProgresstime()
-/* 48: */ {
-/* 49: 42 */ return 1000;
-/* 50: */ }
-/* 51: */
-/* 52: */ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 53: */ {
-/* 54: 46 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
-/* 55: */ }
-/* 56: */
-/* 57: */ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 58: */ {
-/* 59: 51 */ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000);
-/* 60: */ }
-/* 61: */
-/* 62: */ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
-/* 63: */ {
-/* 64: 56 */ return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescription, this.mTextures);
-/* 65: */ }
-/* 66: */
-/* 67: */ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
-/* 68: */ {
-/* 69: 61 */ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
-/* 70: */ {
-/* 71: 62 */ if (this.mTemperature <= 20)
-/* 72: */ {
-/* 73: 63 */ this.mTemperature = 20;
-/* 74: 64 */ this.mLossTimer = 0;
-/* 75: */ }
-/* 76: 67 */ if (++this.mLossTimer > 20)
-/* 77: */ {
-/* 78: 68 */ this.mTemperature -= 1;
-/* 79: 69 */ this.mLossTimer = 0;
-/* 80: */ }
-/* 81: 72 */ for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) {
-/* 82: 72 */ if (i != aBaseMetaTileEntity.getFrontFacing())
-/* 83: */ {
-/* 84: 73 */ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
-/* 85: 74 */ if (tTileEntity != null)
-/* 86: */ {
-/* 87: 75 */ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
-/* 88: 76 */ if (tDrained != null)
-/* 89: */ {
-/* 90: 77 */ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
-/* 91: 78 */ if (tFilledAmount > 0) {
-/* 92: 79 */ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
-/* 93: */ }
-/* 94: */ }
-/* 95: */ }
-/* 96: */ }
-/* 97: */ }
-/* 98: 85 */ if (aTick % 10L == 0L) {
-/* 99: 86 */ if (this.mTemperature > 100)
-/* 100: */ {
-/* 101: 87 */ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
-/* 102: */ {
-/* 103: 88 */ this.mHadNoWater = true;
-/* 104: */ }
-/* 105: */ else
-/* 106: */ {
-/* 107: 90 */ if (this.mHadNoWater)
-/* 108: */ {
-/* 109: 91 */ aBaseMetaTileEntity.doExplosion(2048L);
-/* 110: 92 */ return;
-/* 111: */ }
-/* 112: 94 */ this.mFluid.amount -= 1;
-/* 113: 95 */ if (this.mSteam == null) {
-/* 114: 96 */ this.mSteam = GT_ModHandler.getSteam(300L);
-/* 115: 98 */ } else if (GT_ModHandler.isSteam(this.mSteam)) {
-/* 116: 99 */ this.mSteam.amount += 300;
-/* 117: */ } else {
-/* 118:101 */ this.mSteam = GT_ModHandler.getSteam(300L);
-/* 119: */ }
-/* 120: */ }
-/* 121: */ }
-/* 122: */ else {
-/* 123:106 */ this.mHadNoWater = false;
-/* 124: */ }
-/* 125: */ }
-/* 126:110 */ if ((this.mSteam != null) &&
-/* 127:111 */ (this.mSteam.amount > 32000))
-/* 128: */ {
-/* 129:112 */ sendSound((byte)1);
-/* 130:113 */ this.mSteam.amount = 24000;
-/* 131: */ }
-/* 132:117 */ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
-/* 133:118 */ (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(Materials.Lava))))
-/* 134: */ {
-/* 135:119 */ this.mProcessingEnergy += 1000;
-/* 136:120 */ aBaseMetaTileEntity.decrStackSize(2, 1);
-/* 137:121 */ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L));
-/* 138: */ }
-/* 139:125 */ if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 8L == 0L))
-/* 140: */ {
-/* 141:126 */ this.mProcessingEnergy -= 2;
-/* 142:127 */ this.mTemperature += 1;
-/* 143: */ }
-/* 144:130 */ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
-/* 145: */ }
-/* 146: */ }
-/* 147: */
-/* 148: */ public final int fill(FluidStack aFluid, boolean doFill)
-/* 149: */ {
-/* 150:136 */ if ((GT_ModHandler.isLava(aFluid)) && (this.mProcessingEnergy < 50))
-/* 151: */ {
-/* 152:137 */ int tFilledAmount = Math.min(50, aFluid.amount);
-/* 153:138 */ if (doFill) {
-/* 154:138 */ this.mProcessingEnergy += tFilledAmount;
-/* 155: */ }
-/* 156:139 */ return tFilledAmount;
-/* 157: */ }
-/* 158:141 */ return super.fill(aFluid, doFill);
-/* 159: */ }
-/* 160: */ }
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.gui.GT_Container_Boiler;
+import gregtech.common.gui.GT_GUIContainer_Boiler;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class GT_MetaTileEntity_Boiler_Lava
+ extends GT_MetaTileEntity_Boiler
+{
+ public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional)
+ {
+ super(aID, aName, aNameRegional, "A Boiler running off Lava", new ITexture[0]);
+ }
+
+ public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
+ {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ public ITexture[][][] getTextureSet(ITexture[] aTextures)
+ {
+ ITexture[][][] rTextures = new ITexture[5][17][];
+ for (byte i = -1; i < 16; i++){
+ rTextures[0][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[1][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
+ rTextures[2][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
+ rTextures[3][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT) };
+ rTextures[4][(i + 1)] = new ITexture [] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_LAVA_FRONT_ACTIVE) };
+ }
+ return rTextures;
+ }
+
+ public int maxProgresstime()
+ {
+ return 1000;
+ }
+
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
+ }
+
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000);
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
+ {
+ return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
+ {
+ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
+ {
+ if (this.mTemperature <= 20)
+ {
+ this.mTemperature = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 20)
+ {
+ this.mTemperature -= 1;
+ this.mLossTimer = 0;
+ }
+ for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) {
+ if (i != aBaseMetaTileEntity.getFrontFacing())
+ {
+ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
+ if (tTileEntity != null)
+ {
+ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ if (tDrained != null)
+ {
+ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ if (tFilledAmount > 0) {
+ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
+ }
+ }
+ }
+ }
+ }
+ if (aTick % 10L == 0L) {
+ if (this.mTemperature > 100)
+ {
+ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
+ {
+ this.mHadNoWater = true;
+ }
+ else
+ {
+ if (this.mHadNoWater)
+ {
+ aBaseMetaTileEntity.doExplosion(2048L);
+ return;
+ }
+ this.mFluid.amount -= 1;
+ if (this.mSteam == null) {
+ this.mSteam = GT_ModHandler.getSteam(300L);
+ } else if (GT_ModHandler.isSteam(this.mSteam)) {
+ this.mSteam.amount += 300;
+ } else {
+ this.mSteam = GT_ModHandler.getSteam(300L);
+ }
+ }
+ }
+ else {
+ this.mHadNoWater = false;
+ }
+ }
+ if ((this.mSteam != null) &&
+ (this.mSteam.amount > 32000))
+ {
+ sendSound((byte)1);
+ this.mSteam.amount = 24000;
+ }
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
+ (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.bucket.get(Materials.Lava))))
+ {
+ this.mProcessingEnergy += 1000;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.bucket, Materials.Empty, 1L));
+ }
+ if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 8L == 0L))
+ {
+ this.mProcessingEnergy -= 2;
+ this.mTemperature += 1;
+ }
+ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
+ }
+ }
+
+ public final int fill(FluidStack aFluid, boolean doFill)
+ {
+ if ((GT_ModHandler.isLava(aFluid)) && (this.mProcessingEnergy < 50))
+ {
+ int tFilledAmount = Math.min(50, aFluid.amount);
+ if (doFill) {
+ this.mProcessingEnergy += tFilledAmount;
+ }
+ return tFilledAmount;
+ }
+ return super.fill(aFluid, doFill);
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
diff --git a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index 2d298fed43..da841a59e6 100644 --- a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -1,155 +1,155 @@ -/* 1: */ package gregtech.common.tileentities.boilers;
-/* 2: */
-/* 3: */ import gregtech.api.enums.Dyes;
+package gregtech.common.tileentities.boilers;
+
+import gregtech.api.enums.Dyes;
import gregtech.api.enums.Textures;
-/* 4: */ import gregtech.api.enums.Textures.BlockIcons;
-/* 5: */ import gregtech.api.interfaces.ITexture;
-/* 6: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-/* 7: */ import gregtech.api.metatileentity.MetaTileEntity;
-/* 8: */ import gregtech.api.objects.GT_RenderedTexture;
-/* 9: */ import gregtech.api.util.GT_ModHandler;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
-/* 10: */ import gregtech.common.gui.GT_Container_Boiler;
-/* 11: */ import gregtech.common.gui.GT_GUIContainer_Boiler;
-/* 12: */ import net.minecraft.entity.player.InventoryPlayer;
-/* 13: */ import net.minecraft.world.World;
-/* 14: */ import net.minecraft.world.biome.BiomeGenBase;
-/* 15: */ import net.minecraftforge.common.util.ForgeDirection;
-/* 16: */ import net.minecraftforge.fluids.FluidStack;
-/* 17: */ import net.minecraftforge.fluids.IFluidHandler;
-/* 18: */
-/* 19: */ public class GT_MetaTileEntity_Boiler_Solar
-/* 20: */ extends GT_MetaTileEntity_Boiler
-/* 21: */ {
-/* 22: */ public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional)
-/* 23: */ {
-/* 24: 19 */ super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
-/* 25: */ }
-/* 26: */
-/* 27: */ public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
-/* 28: */ {
-/* 29: 23 */ super(aName, aTier, aDescription, aTextures);
-/* 30: */ }
-/* 31: */
-/* 32: */ public ITexture[][][] getTextureSet(ITexture[] aTextures)
-/* 33: */ {
-/* 34: 28 */ ITexture[][][] rTextures = new ITexture[4][17][];
-/* 35: 29 */ for (byte i = -1; i < 16; i = (byte)(i + 1))
-/* 36: */ {ITexture[] tmp0 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
-/* 37: 30 */ rTextures[0][(i + 1)] = tmp0;
-/* 38: 31 */ ITexture[] tmp1 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR) };
+import gregtech.common.gui.GT_Container_Boiler;
+import gregtech.common.gui.GT_GUIContainer_Boiler;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class GT_MetaTileEntity_Boiler_Solar
+ extends GT_MetaTileEntity_Boiler
+{
+ public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional)
+ {
+ super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
+ }
+
+ public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
+ {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ public ITexture[][][] getTextureSet(ITexture[] aTextures)
+ {
+ ITexture[][][] rTextures = new ITexture[4][17][];
+ for (byte i = -1; i < 16; i = (byte)(i + 1))
+ {ITexture[] tmp0 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[0][(i + 1)] = tmp0;
+ ITexture[] tmp1 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_SOLAR) };
rTextures[1][(i + 1)] = tmp1;
-/* 39: 32 */ ITexture[] tmp2 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ ITexture[] tmp2 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
rTextures[2][(i + 1)] = tmp2;
-/* 40: 33 */ ITexture[] tmp3 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
+ ITexture[] tmp3 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[3][(i + 1)] = tmp3;
-/* 41: */ }
-/* 42: 35 */ return rTextures;
-/* 43: */ }
-/* 44: */
-/* 45: */ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)
-/* 46: */ {
+ }
+ return rTextures;
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)
+ {
return mTextures[aSide >= 2 ? ((byte)(aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
-/* 48: */ }
-/* 49: */
-/* 50: */ public int maxProgresstime()
-/* 51: */ {
-/* 52: 43 */ return 500;
-/* 53: */ }
-/* 54: */
-/* 55: */ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 56: */ {
-/* 57: 47 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
-/* 58: */ }
-/* 59: */
-/* 60: */ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 61: */ {
-/* 62: 52 */ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
-/* 63: */ }
-/* 64: */
-/* 65: */ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
-/* 66: */ {
-/* 67: 57 */ return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
-/* 68: */ }
-/* 69: */
-/* 70: */ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
-/* 71: */ {
-/* 72: 62 */ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
-/* 73: */ {
-/* 74: 63 */ if (this.mTemperature <= 20)
-/* 75: */ {
-/* 76: 64 */ this.mTemperature = 20;
-/* 77: 65 */ this.mLossTimer = 0;
-/* 78: */ }
-/* 79: 68 */ if (++this.mLossTimer > 45)
-/* 80: */ {
-/* 81: 69 */ this.mTemperature -= 1;
-/* 82: 70 */ this.mLossTimer = 0;
-/* 83: */ }
-/* 84: 73 */ if (this.mSteam != null)
-/* 85: */ {
-/* 86: 74 */ byte i = aBaseMetaTileEntity.getFrontFacing();
-/* 87: 75 */ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
-/* 88: 76 */ if (tTileEntity != null)
-/* 89: */ {
-/* 90: 77 */ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
-/* 91: 78 */ if (tDrained != null)
-/* 92: */ {
-/* 93: 79 */ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
-/* 94: 80 */ if (tFilledAmount > 0) {
-/* 95: 81 */ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
-/* 96: */ }
-/* 97: */ }
-/* 98: */ }
-/* 99: */ }
-/* 100: 87 */ if (aTick % 25L == 0L) {
-/* 101: 88 */ if (this.mTemperature > 100)
-/* 102: */ {
-/* 103: 89 */ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
-/* 104: */ {
-/* 105: 90 */ this.mHadNoWater = true;
-/* 106: */ }
-/* 107: */ else
-/* 108: */ {
-/* 109: 92 */ if (this.mHadNoWater)
-/* 110: */ {
-/* 111: 93 */ aBaseMetaTileEntity.doExplosion(2048L);
-/* 112: 94 */ return;
-/* 113: */ }
-/* 114: 96 */ this.mFluid.amount -= 1;
-/* 115: 97 */ if (this.mSteam == null) {
-/* 116: 98 */ this.mSteam = GT_ModHandler.getSteam(150L);
-/* 117:100 */ } else if (GT_ModHandler.isSteam(this.mSteam)) {
-/* 118:101 */ this.mSteam.amount += 150;
-/* 119: */ } else {
-/* 120:103 */ this.mSteam = GT_ModHandler.getSteam(150L);
-/* 121: */ }
-/* 122: */ }
-/* 123: */ }
-/* 124: */ else {
-/* 125:108 */ this.mHadNoWater = false;
-/* 126: */ }
-/* 127: */ }
-/* 128:112 */ if ((this.mSteam != null) &&
-/* 129:113 */ (this.mSteam.amount > 16000))
-/* 130: */ {
-/* 131:114 */ sendSound((byte)1);
-/* 132:115 */ this.mSteam.amount = 12000;
-/* 133: */ }
-/* 134:119 */ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering()))
-/* 135: */ {
-/* 136:120 */ boolean bRain = (aBaseMetaTileEntity.getWorld().isRaining()) && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
-/* 137:121 */ this.mProcessingEnergy += (((!bRain) || (aBaseMetaTileEntity.getWorld().skylightSubtracted < 4)) && (aBaseMetaTileEntity.getSkyAtSide((byte)1)) ? 8 : (bRain) || (!aBaseMetaTileEntity.getWorld().isDaytime()) ? 1 : 0);
-/* 138: */ }
-/* 139:124 */ if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L))
-/* 140: */ {
-/* 141:125 */ this.mProcessingEnergy -= 1;
-/* 142:126 */ this.mTemperature += 1;
-/* 143: */ }
-/* 144:129 */ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
-/* 145: */ }
-/* 146: */ }
-/* 147: */ }
+ }
+
+ public int maxProgresstime()
+ {
+ return 500;
+ }
+
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
+ }
+
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SolarBoiler.png", 16000);
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
+ {
+ return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
+ {
+ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
+ {
+ if (this.mTemperature <= 20)
+ {
+ this.mTemperature = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 45)
+ {
+ this.mTemperature -= 1;
+ this.mLossTimer = 0;
+ }
+ if (this.mSteam != null)
+ {
+ byte i = aBaseMetaTileEntity.getFrontFacing();
+ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
+ if (tTileEntity != null)
+ {
+ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ if (tDrained != null)
+ {
+ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ if (tFilledAmount > 0) {
+ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
+ }
+ }
+ }
+ }
+ if (aTick % 25L == 0L) {
+ if (this.mTemperature > 100)
+ {
+ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
+ {
+ this.mHadNoWater = true;
+ }
+ else
+ {
+ if (this.mHadNoWater)
+ {
+ aBaseMetaTileEntity.doExplosion(2048L);
+ return;
+ }
+ this.mFluid.amount -= 1;
+ if (this.mSteam == null) {
+ this.mSteam = GT_ModHandler.getSteam(150L);
+ } else if (GT_ModHandler.isSteam(this.mSteam)) {
+ this.mSteam.amount += 150;
+ } else {
+ this.mSteam = GT_ModHandler.getSteam(150L);
+ }
+ }
+ }
+ else {
+ this.mHadNoWater = false;
+ }
+ }
+ if ((this.mSteam != null) &&
+ (this.mSteam.amount > 16000))
+ {
+ sendSound((byte)1);
+ this.mSteam.amount = 12000;
+ }
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering()))
+ {
+ boolean bRain = (aBaseMetaTileEntity.getWorld().isRaining()) && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F);
+ this.mProcessingEnergy += (((!bRain) || (aBaseMetaTileEntity.getWorld().skylightSubtracted < 4)) && (aBaseMetaTileEntity.getSkyAtSide((byte)1)) ? 8 : (bRain) || (!aBaseMetaTileEntity.getWorld().isDaytime()) ? 1 : 0);
+ }
+ if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L))
+ {
+ this.mProcessingEnergy -= 1;
+ this.mTemperature += 1;
+ }
+ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
+ }
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
diff --git a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java index c50243e77d..7b8361fa96 100644 --- a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java +++ b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -1,183 +1,183 @@ -/* 1: */ package gregtech.common.tileentities.boilers;
-/* 2: */
-/* 3: */ import gregtech.api.enums.Dyes;
-/* 4: */ import gregtech.api.enums.Materials;
-/* 5: */ import gregtech.api.enums.OrePrefixes;
+package gregtech.common.tileentities.boilers;
+
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.Textures;
-/* 6: */ import gregtech.api.enums.Textures.BlockIcons;
-/* 7: */ import gregtech.api.interfaces.ITexture;
-/* 8: */ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-/* 9: */ import gregtech.api.metatileentity.MetaTileEntity;
-/* 10: */ import gregtech.api.objects.GT_RenderedTexture;
-/* 11: */ import gregtech.api.util.GT_ModHandler;
-/* 12: */ import gregtech.api.util.GT_OreDictUnificator;
-/* 13: */ import gregtech.common.gui.GT_Container_Boiler;
-/* 14: */ import gregtech.common.gui.GT_GUIContainer_Boiler;
-/* 15: */ import net.minecraft.entity.player.InventoryPlayer;
-/* 16: */ import net.minecraftforge.common.util.ForgeDirection;
-/* 17: */ import net.minecraftforge.fluids.FluidStack;
-/* 18: */ import net.minecraftforge.fluids.IFluidHandler;
-/* 19: */
-/* 20: */ public class GT_MetaTileEntity_Boiler_Steel
-/* 21: */ extends GT_MetaTileEntity_Boiler
-/* 22: */ {
-/* 23: */ public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional)
-/* 24: */ {
-/* 25: 22 */ super(aID, aName, aNameRegional, "Faster than the Bronze Boiler", new ITexture[0]);
-/* 26: */ }
-/* 27: */
-/* 28: */ public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
-/* 29: */ {
-/* 30: 26 */ super(aName, aTier, aDescription, aTextures);
-/* 31: */ }
-/* 32: */
-/* 33: */ public ITexture[][][] getTextureSet(ITexture[] aTextures)
-/* 34: */ {
-/* 35: 31 */ ITexture[][][] rTextures = new ITexture[5][17][];
-/* 36: 32 */ for (byte i = -1; i < 16; i = (byte)(i + 1))
-/* 37: */ {ITexture[] tmp0 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
-/* 38: 33 */ rTextures[0][(i + 1)] = tmp0;
-/* 39: 34 */ ITexture[] tmp1 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.gui.GT_Container_Boiler;
+import gregtech.common.gui.GT_GUIContainer_Boiler;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class GT_MetaTileEntity_Boiler_Steel
+ extends GT_MetaTileEntity_Boiler
+{
+ public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional)
+ {
+ super(aID, aName, aNameRegional, "Faster than the Bronze Boiler", new ITexture[0]);
+ }
+
+ public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures)
+ {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ public ITexture[][][] getTextureSet(ITexture[] aTextures)
+ {
+ ITexture[][][] rTextures = new ITexture[5][17][];
+ for (byte i = -1; i < 16; i = (byte)(i + 1))
+ {ITexture[] tmp0 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) };
+ rTextures[0][(i + 1)] = tmp0;
+ ITexture[] tmp1 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_TOP, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[1][(i + 1)] = tmp1;
-/* 40: 35 */ ITexture[] tmp2 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
+ ITexture[] tmp2 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE) };
rTextures[2][(i + 1)] = tmp2;
-/* 41: 36 */ ITexture[] tmp4 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) };
+ ITexture[] tmp4 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) };
rTextures[3][(i + 1)] = tmp4;
-/* 42: 37 */ ITexture[] tmp5 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) };
+ ITexture[] tmp5 ={ new GT_RenderedTexture(Textures.BlockIcons.MACHINE_STEELBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) };
rTextures[4][(i + 1)] = tmp5;
-/* 43: */ }
-/* 44: 39 */ return rTextures;
-/* 45: */ }
-/* 46: */
-/* 47: */ public int maxProgresstime()
-/* 48: */ {
-/* 49: 42 */ return 1000;
-/* 50: */ }
-/* 51: */
-/* 52: */ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 53: */ {
-/* 54: 46 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
-/* 55: */ }
-/* 56: */
-/* 57: */ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
-/* 58: */ {
-/* 59: 51 */ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000);
-/* 60: */ }
-/* 61: */
-/* 62: */ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
-/* 63: */ {
-/* 64: 56 */ return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescription, this.mTextures);
-/* 65: */ }
-/* 66: */
-/* 67: */ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
-/* 68: */ {
-/* 69: 61 */ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
-/* 70: */ {
-/* 71: 62 */ if (this.mTemperature <= 20)
-/* 72: */ {
-/* 73: 63 */ this.mTemperature = 20;
-/* 74: 64 */ this.mLossTimer = 0;
-/* 75: */ }
-/* 76: 67 */ if (++this.mLossTimer > 40)
-/* 77: */ {
-/* 78: 68 */ this.mTemperature -= 1;
-/* 79: 69 */ this.mLossTimer = 0;
-/* 80: */ }
-/* 81: 72 */ for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) {
-/* 82: 72 */ if (i != aBaseMetaTileEntity.getFrontFacing())
-/* 83: */ {
-/* 84: 73 */ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
-/* 85: 74 */ if (tTileEntity != null)
-/* 86: */ {
-/* 87: 75 */ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
-/* 88: 76 */ if (tDrained != null)
-/* 89: */ {
-/* 90: 77 */ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
-/* 91: 78 */ if (tFilledAmount > 0) {
-/* 92: 79 */ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
-/* 93: */ }
-/* 94: */ }
-/* 95: */ }
-/* 96: */ }
-/* 97: */ }
-/* 98: 85 */ if (aTick % 10L == 0L) {
-/* 99: 86 */ if (this.mTemperature > 100)
-/* 100: */ {
-/* 101: 87 */ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
-/* 102: */ {
-/* 103: 88 */ this.mHadNoWater = true;
-/* 104: */ }
-/* 105: */ else
-/* 106: */ {
-/* 107: 90 */ if (this.mHadNoWater)
-/* 108: */ {
-/* 109: 91 */ aBaseMetaTileEntity.doExplosion(2048L);
-/* 110: 92 */ return;
-/* 111: */ }
-/* 112: 94 */ this.mFluid.amount -= 1;
-/* 113: 95 */ if (this.mSteam == null) {
-/* 114: 96 */ this.mSteam = GT_ModHandler.getSteam(150L);
-/* 115: 98 */ } else if (GT_ModHandler.isSteam(this.mSteam)) {
-/* 116: 99 */ this.mSteam.amount += 150;
-/* 117: */ } else {
-/* 118:101 */ this.mSteam = GT_ModHandler.getSteam(150L);
-/* 119: */ }
-/* 120: */ }
-/* 121: */ }
-/* 122: */ else {
-/* 123:106 */ this.mHadNoWater = false;
-/* 124: */ }
-/* 125: */ }
-/* 126:110 */ if ((this.mSteam != null) &&
-/* 127:111 */ (this.mSteam.amount > 32000))
-/* 128: */ {
-/* 129:112 */ sendSound((byte)1);
-/* 130:113 */ this.mSteam.amount = 24000;
-/* 131: */ }
-/* 132:117 */ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
-/* 133:118 */ (this.mInventory[2] != null)) {
-/* 134:119 */ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal))))
-/* 135: */ {
-/* 136:123 */ this.mProcessingEnergy += 160;
-/* 137:124 */ aBaseMetaTileEntity.decrStackSize(2, 1);
-/* 138:125 */ if (aBaseMetaTileEntity.getRandomNumber(3) == 0) {
-/* 139:126 */ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
-/* 140: */ }
-/* 141: */ }
-/* 142:129 */ else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Charcoal))))
-/* 143: */ {
-/* 144:133 */ this.mProcessingEnergy += 160;
-/* 145:134 */ aBaseMetaTileEntity.decrStackSize(2, 1);
-/* 146:135 */ if (aBaseMetaTileEntity.getRandomNumber(3) == 0) {
-/* 147:136 */ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
-/* 148: */ }
-/* 149: */ }
-/* 150:138 */ else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke"))
-/* 151: */ {
-/* 152:139 */ this.mProcessingEnergy += 640;
-/* 153:140 */ aBaseMetaTileEntity.decrStackSize(2, 1);
-/* 154:141 */ if (aBaseMetaTileEntity.getRandomNumber(2) == 0) {
-/* 155:142 */ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
-/* 156: */ }
-/* 157: */ }
-/* 158:144 */ else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite))))
-/* 159: */ {
-/* 160:148 */ this.mProcessingEnergy += 40;
-/* 161:149 */ aBaseMetaTileEntity.decrStackSize(2, 1);
-/* 162:150 */ if (aBaseMetaTileEntity.getRandomNumber(8) == 0) {
-/* 163:151 */ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
-/* 164: */ }
-/* 165: */ }
-/* 166: */ }
-/* 167:157 */ if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L))
-/* 168: */ {
-/* 169:158 */ this.mProcessingEnergy -= 2;
-/* 170:159 */ this.mTemperature += 1;
-/* 171: */ }
-/* 172:162 */ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
-/* 173: */ }
-/* 174: */ }
-/* 175: */ }
+ }
+ return rTextures;
+ }
+
+ public int maxProgresstime()
+ {
+ return 1000;
+ }
+
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
+ }
+
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+ {
+ return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "SteelBoiler.png", 32000);
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity)
+ {
+ return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
+ {
+ if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L))
+ {
+ if (this.mTemperature <= 20)
+ {
+ this.mTemperature = 20;
+ this.mLossTimer = 0;
+ }
+ if (++this.mLossTimer > 40)
+ {
+ this.mTemperature -= 1;
+ this.mLossTimer = 0;
+ }
+ for (byte i = 1; (this.mSteam != null) && (i < 6); i = (byte)(i + 1)) {
+ if (i != aBaseMetaTileEntity.getFrontFacing())
+ {
+ IFluidHandler tTileEntity = aBaseMetaTileEntity.getITankContainerAtSide(i);
+ if (tTileEntity != null)
+ {
+ FluidStack tDrained = aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), Math.max(1, this.mSteam.amount / 2), false);
+ if (tDrained != null)
+ {
+ int tFilledAmount = tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), tDrained, false);
+ if (tFilledAmount > 0) {
+ tTileEntity.fill(ForgeDirection.getOrientation(i).getOpposite(), aBaseMetaTileEntity.drain(ForgeDirection.getOrientation(i), tFilledAmount, true), true);
+ }
+ }
+ }
+ }
+ }
+ if (aTick % 10L == 0L) {
+ if (this.mTemperature > 100)
+ {
+ if ((this.mFluid == null) || (!GT_ModHandler.isWater(this.mFluid)) || (this.mFluid.amount <= 0))
+ {
+ this.mHadNoWater = true;
+ }
+ else
+ {
+ if (this.mHadNoWater)
+ {
+ aBaseMetaTileEntity.doExplosion(2048L);
+ return;
+ }
+ this.mFluid.amount -= 1;
+ if (this.mSteam == null) {
+ this.mSteam = GT_ModHandler.getSteam(150L);
+ } else if (GT_ModHandler.isSteam(this.mSteam)) {
+ this.mSteam.amount += 150;
+ } else {
+ this.mSteam = GT_ModHandler.getSteam(150L);
+ }
+ }
+ }
+ else {
+ this.mHadNoWater = false;
+ }
+ }
+ if ((this.mSteam != null) &&
+ (this.mSteam.amount > 32000))
+ {
+ sendSound((byte)1);
+ this.mSteam.amount = 24000;
+ }
+ if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) &&
+ (this.mInventory[2] != null)) {
+ if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Coal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Coal))))
+ {
+ this.mProcessingEnergy += 160;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ if (aBaseMetaTileEntity.getRandomNumber(3) == 0) {
+ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
+ }
+ }
+ else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Charcoal))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Charcoal))))
+ {
+ this.mProcessingEnergy += 160;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ if (aBaseMetaTileEntity.getRandomNumber(3) == 0) {
+ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
+ }
+ }
+ else if (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], "fuelCoke"))
+ {
+ this.mProcessingEnergy += 640;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ if (aBaseMetaTileEntity.getRandomNumber(2) == 0) {
+ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
+ }
+ }
+ else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite))))
+ {
+ this.mProcessingEnergy += 40;
+ aBaseMetaTileEntity.decrStackSize(2, 1);
+ if (aBaseMetaTileEntity.getRandomNumber(8) == 0) {
+ aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
+ }
+ }
+ }
+ if ((this.mTemperature < 1000) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L))
+ {
+ this.mProcessingEnergy -= 2;
+ this.mTemperature += 1;
+ }
+ aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
+ }
+ }
+}
/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
|