diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-06 06:24:07 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-07-06 06:24:07 +1000 |
commit | b8dcf8f77993de9e2d363687529f14679d733651 (patch) | |
tree | 351d19edda8674a872c97713bbf61f4ebcd9a3c8 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities | |
parent | 7e234e41829d5775a772f7d6195d1dc0b3f6073b (diff) | |
download | GT5-Unofficial-b8dcf8f77993de9e2d363687529f14679d733651.tar.gz GT5-Unofficial-b8dcf8f77993de9e2d363687529f14679d733651.tar.bz2 GT5-Unofficial-b8dcf8f77993de9e2d363687529f14679d733651.zip |
% Allowed covers on Adv. Boilers, Semi-Fluid Generators & Energy Buffers. Closes #325.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
3 files changed, 38 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java index d5d2e23536..221d81e74a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java @@ -12,6 +12,7 @@ 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_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; @@ -94,7 +95,7 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex - + 1]; + + 1]; } public ITexture[] getFront(final byte aColor) { @@ -204,11 +205,11 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { // Utils.LOG_MACHINE_INFO("Ticking Boiler"); //if (aTick % 60L == 0L) { - // Utils.LOG_MACHINE_INFO("Temp:"+this.mTemperature); - // Utils.LOG_MACHINE_INFO("getCapacity():"+this.getCapacity()); - // Utils.LOG_MACHINE_INFO("maxProgresstime():"+this.maxProgresstime()); - // Utils.LOG_MACHINE_INFO("mSteamPerSecond:"+this.mSteamPerSecond); - // Utils.LOG_MACHINE_INFO("mProcessingEnergy:"+this.mProcessingEnergy); + // Utils.LOG_MACHINE_INFO("Temp:"+this.mTemperature); + // Utils.LOG_MACHINE_INFO("getCapacity():"+this.getCapacity()); + // Utils.LOG_MACHINE_INFO("maxProgresstime():"+this.maxProgresstime()); + // Utils.LOG_MACHINE_INFO("mSteamPerSecond:"+this.mSteamPerSecond); + // Utils.LOG_MACHINE_INFO("mProcessingEnergy:"+this.mProcessingEnergy); //} int mTempSteam = this.mSteam != null ? this.mSteam.amount : 0; @@ -247,16 +248,16 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { aBaseMetaTileEntity.doExplosion(4096L); return; } - + //this.mFluid.amount -= (10 * this.mBoilerTier); - + this.mFluid.amount -= (mSteamPerSecond/160); - - Logger.MACHINE_INFO("Draining "+(mSteamPerSecond/160)+"L of water. There is "+this.mFluid.amount+"L left."); + + Logger.MACHINE_INFO("Draining "+(mSteamPerSecond/160)+"L of water. There is "+this.mFluid.amount+"L left."); if (this.mSteam == null) { this.mSteam = GT_ModHandler.getSteam((this.mSteamPerSecond)); Logger.MACHINE_INFO("Added "+(this.mSteam.amount-mTempSteam)+"L of steam."); - + } else if (GT_ModHandler.isSteam(this.mSteam)) { this.mSteam.amount += (this.mSteamPerSecond); @@ -353,4 +354,12 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { return false; } } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java index 55fbbfd9da..0bb0a97263 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java @@ -12,6 +12,7 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator; +import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Recipe; @@ -81,6 +82,14 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi } @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } + + @Override public int getFuelValue(ItemStack aStack) { if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) return 0; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java index 22cace9cff..52c1c8818a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java @@ -14,6 +14,7 @@ import gregtech.api.gui.GT_GUIContainer_1by1; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; @@ -42,6 +43,14 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity { public String[] getDescription() { return new String[] {this.mDescription, "Accepts/Outputs 4Amp", CORE.GT_Tooltip}; } + + @Override + public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCover) { + if (aSide != this.getBaseMetaTileEntity().getFrontFacing()) { + return true; + } + return super.allowCoverOnSide(aSide, aCover); + } /* * MACHINE_STEEL_SIDE |