diff options
| author | Foghrye4 <foghrye4@gmail.com> | 2017-08-10 18:52:45 +0300 |
|---|---|---|
| committer | Foghrye4 <foghrye4@gmail.com> | 2017-08-10 18:52:45 +0300 |
| commit | 0427ab89f1753a44b30cbc35ce021cbbdc845109 (patch) | |
| tree | abe418ff5ec174e712fe8dedd434548a945b15a3 /src/main/java/gregtech/common/tileentities/boilers | |
| parent | 877312184c472d9845e5ef1008bc538f4634059f (diff) | |
fix missing source folder
Diffstat (limited to 'src/main/java/gregtech/common/tileentities/boilers')
5 files changed, 1061 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java new file mode 100644 index 0000000..8fce193 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java @@ -0,0 +1,356 @@ +package gregtech.common.tileentities.boilers; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank; +import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidHandler; + +public abstract class GT_MetaTileEntity_Boiler + extends GT_MetaTileEntity_BasicTank +{ + public int mTemperature = 20; + public int mProcessingEnergy = 0; + public int mLossTimer = 0; + public FluidStack mSteam = null; + public boolean mHadNoWater = false; + + public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String aDescription, ITexture... aTextures) + { + super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures); + } + + public GT_MetaTileEntity_Boiler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) + { + super(aName, aTier, 4, aDescription, aTextures); + } + + @Override +public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) + { + ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte)(aActive ? 4 : 3)) : aSide][aColorIndex + 1]; + //mTextures[(aSide==aFacing?(aActive?4:3):aSide==GT_Utility.getOppositeSide(aFacing)?2:aSide==0?0:aSide==1?1:2)][aColorIndex+1]; + if(aSide!=aFacing&&tmp.length==2){ + tmp = new ITexture[]{tmp[0]}; + } + return tmp; + } + + @Override +public boolean isElectric() + { + return false; + } + + @Override +public boolean isPneumatic() + { + return false; + } + + @Override +public boolean isSteampowered() + { + return false; + } + + @Override +public boolean isSimpleMachine() + { + return false; + } + + @Override +public boolean isFacingValid(byte aFacing) + { + return aFacing > 1; + } + + @Override +public boolean isAccessAllowed(EntityPlayer aPlayer) + { + return true; + } + + @Override +public boolean isValidSlot(int aIndex) + { + return true; + } + + @Override +public int getProgresstime() + { + return this.mTemperature; + } + + @Override +public int maxProgresstime() + { + return 500; + } + + @Override +public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) + { + if (aBaseMetaTileEntity.isClientSide()) { + return true; + } + if (aPlayer != null) { + if (GT_Utility.areStacksEqual(aPlayer.getCurrentEquippedItem(), new ItemStack(Items.water_bucket, 1))) + { + fill(Materials.Water.getFluid(1000 * aPlayer.getCurrentEquippedItem().stackSize), true); + aPlayer.getCurrentEquippedItem().func_150996_a(Items.bucket); + } + else + { + aBaseMetaTileEntity.openGUI(aPlayer); + } + } + return true; + } + + @Override +public boolean doesFillContainers() + { + return true; + } + + @Override +public boolean doesEmptyContainers() + { + return true; + } + + @Override +public boolean canTankBeFilled() + { + return true; + } + + @Override +public boolean canTankBeEmptied() + { + return true; + } + + @Override +public boolean displaysItemStack() + { + return false; + } + + @Override +public boolean displaysStackSize() + { + return false; + } + + @Override +public boolean isFluidInputAllowed(FluidStack aFluid) + { + return GT_ModHandler.isWater(aFluid); + } + + @Override +public FluidStack getDrainableStack() + { + return this.mSteam; + } + + @Override +public FluidStack setDrainableStack(FluidStack aFluid) + { + this.mSteam = aFluid;return this.mSteam; + } + + @Override +public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) + { + return GregTech_API.getCoverBehavior(aCover.toStack()).isSimpleCover(); + } + + @Override +public void saveNBTData(NBTTagCompound aNBT) + { + super.saveNBTData(aNBT); + aNBT.setInteger("mLossTimer", this.mLossTimer); + aNBT.setInteger("mTemperature", this.mTemperature); + aNBT.setInteger("mProcessingEnergy", this.mProcessingEnergy); + if (this.mSteam != null) { + try + { + aNBT.setTag("mSteam", this.mSteam.writeToNBT(new NBTTagCompound())); + } + catch (Throwable e) {} + } + } + + @Override +public void loadNBTData(NBTTagCompound aNBT) + { + super.loadNBTData(aNBT); + this.mLossTimer = aNBT.getInteger("mLossTimer"); + this.mTemperature = aNBT.getInteger("mTemperature"); + this.mProcessingEnergy = aNBT.getInteger("mProcessingEnergy"); + this.mSteam = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mSteam")); + } + + @Override +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))) + { + 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); + } + } + + @Override +public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return (aIndex == 1) || (aIndex == 3); + } + + @Override +public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return aIndex == 2; + } + + @Override +public void doSound(byte aIndex, double aX, double aY, double aZ) + { + if (aIndex == 1) + { + GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(Integer.valueOf(4)), 2, 1.0F, aX, aY, aZ); + for (int l = 0; l < 8; l++) { + getBaseMetaTileEntity().getWorld().spawnParticle("largesmoke", aX - 0.5D + Math.random(), aY, aZ - 0.5D + Math.random(), 0.0D, 0.0D, 0.0D); + } + } + } + + @Override +public int getCapacity() + { + return 16000; + } + + @Override +public int getTankPressure() + { + return 100; + } +} diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java new file mode 100644 index 0000000..c0ef2e3 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java @@ -0,0 +1,181 @@ +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; +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_Bronze + extends GT_MetaTileEntity_Boiler +{ + public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) + { + super(aID, aName, aNameRegional, "An early way to get Steam Power", new ITexture[0]); + } + + public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) + { + super(aName, aTier, aDescription, aTextures); + } + + @Override +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_BRONZEBRICKS_BOTTOM, Dyes.getModulation(i, Dyes._NULL.mRGBa)) }; + rTextures[1][(i + 1)] = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_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_BRONZEBRICKS_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_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT) }; + rTextures[4][(i + 1)] = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_BRONZEBRICKS_SIDE, Dyes.getModulation(i, Dyes._NULL.mRGBa)), new GT_RenderedTexture(Textures.BlockIcons.BOILER_FRONT_ACTIVE) }; + } + return rTextures; + } + + @Override +public int maxProgresstime() + { + return 500; + } + + @Override +public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) + { + return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000); + } + + @Override +public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) + { + return new GT_GUIContainer_Boiler(aPlayerInventory, aBaseMetaTileEntity, "BronzeBoiler.png", 16000); + } + + @Override +public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + @Override +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; + } + 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 % 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()) && + (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 < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) + { + this.mProcessingEnergy -= 1; + this.mTemperature += 1; + } + aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0); + } + } +} diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java new file mode 100644 index 0000000..e9c654f --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Lava.java @@ -0,0 +1,172 @@ +/* 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;
+import gregtech.api.enums.Textures;
+/* 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: */ @Override
+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: */ @Override
+public int maxProgresstime()
+/* 48: */ {
+/* 49: 42 */ return 1000;
+/* 50: */ }
+/* 51: */
+/* 52: */ @Override
+public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+/* 53: */ {
+/* 54: 46 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
+/* 55: */ }
+/* 56: */
+/* 57: */ @Override
+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: */ @Override
+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: */ @Override
+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: */ @Override
+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: */ }
+
+
+/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
+ * Qualified Name: gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler_Lava
+ * JD-Core Version: 0.7.0.1
+ */
\ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java new file mode 100644 index 0000000..392951a --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -0,0 +1,161 @@ +/* 1: */ package gregtech.common.tileentities.boilers;
+/* 2: */
+/* 3: */ import gregtech.api.enums.Dyes;
+import gregtech.api.enums.Textures;
+/* 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;
+/* 10: */ import gregtech.common.gui.GT_Container_Boiler;
+/* 11: */ import gregtech.common.gui.GT_GUIContainer_Boiler;
+/* 12: */ import net.minecraft.entity.player.InventoryPlayer;
+/* 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: */ @Override
+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) };
+ rTextures[1][(i + 1)] = tmp1;
+/* 39: 32 */ 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) };
+ rTextures[3][(i + 1)] = tmp3;
+/* 41: */ }
+/* 42: 35 */ return rTextures;
+/* 43: */ }
+/* 44: */
+/* 45: */ @Override
+public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)
+/* 46: */ {
+ return mTextures[aSide >= 2 ? ((byte)(aSide != aFacing ? 2 : 3)) : aSide][aColorIndex + 1];
+/* 48: */ }
+/* 49: */
+/* 50: */ @Override
+public int maxProgresstime()
+/* 51: */ {
+/* 52: 43 */ return 500;
+/* 53: */ }
+/* 54: */
+/* 55: */ @Override
+public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+/* 56: */ {
+/* 57: 47 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 16000);
+/* 58: */ }
+/* 59: */
+/* 60: */ @Override
+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: */ @Override
+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: */ @Override
+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: */ }
+
+
+/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
+ * Qualified Name: gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler_Solar
+ * JD-Core Version: 0.7.0.1
+ */
\ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java new file mode 100644 index 0000000..938577e --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java @@ -0,0 +1,191 @@ +/* 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;
+import gregtech.api.enums.Textures;
+/* 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: */ @Override
+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) };
+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) };
+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) };
+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) };
+rTextures[4][(i + 1)] = tmp5;
+/* 43: */ }
+/* 44: 39 */ return rTextures;
+/* 45: */ }
+/* 46: */
+/* 47: */ @Override
+public int maxProgresstime()
+/* 48: */ {
+/* 49: 42 */ return 1000;
+/* 50: */ }
+/* 51: */
+/* 52: */ @Override
+public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity)
+/* 53: */ {
+/* 54: 46 */ return new GT_Container_Boiler(aPlayerInventory, aBaseMetaTileEntity, 32000);
+/* 55: */ }
+/* 56: */
+/* 57: */ @Override
+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: */ @Override
+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: */ @Override
+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: */ }
+
+
+/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
+ * Qualified Name: gregtech.common.tileentities.boilers.GT_MetaTileEntity_Boiler_Steel
+ * JD-Core Version: 0.7.0.1
+ */
\ No newline at end of file |
