diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-04-26 20:58:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-26 20:58:02 +0200 |
commit | 10aeab9e52210144926bf1de189606e844c21c11 (patch) | |
tree | 0a536258bec84775e0e609ad555ee37c4aa53a9a /src/main/java/gregtech/api | |
parent | bb79d26f3d7a79a861529ca272ef85b18d15097a (diff) | |
parent | 6221db0fcc477d038da3275a8607859034103d8b (diff) | |
download | GT5-Unofficial-10aeab9e52210144926bf1de189606e844c21c11.tar.gz GT5-Unofficial-10aeab9e52210144926bf1de189606e844c21c11.tar.bz2 GT5-Unofficial-10aeab9e52210144926bf1de189606e844c21c11.zip |
Merge pull request #511 from GTNewHorizons/fix_7454
fix(multiblockbase): until the muffler has a valid tile
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 48816d1533..193b9d482c 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -16,8 +16,6 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gregtech.common.GT_Pollution; import gregtech.common.items.GT_MetaGenerated_Tool_01; -import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_OutputBus_ME; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -310,8 +308,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); boolean active=aBaseMetaTileEntity.isActive() && mPollution>0; - for(GT_MetaTileEntity_Hatch_Muffler aMuffler:mMufflerHatches) - aMuffler.getBaseMetaTileEntity().setActive(active); + for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { + IGregTechTileEntity iGTTileEntity = aMuffler.getBaseMetaTileEntity(); + if (iGTTileEntity != null && !iGTTileEntity.isDead()) { + iGTTileEntity.setActive(active); + } + } } } |