diff options
author | repo_alt <wvk17@yandex.ru> | 2021-09-19 17:09:05 +0300 |
---|---|---|
committer | repo_alt <wvk17@yandex.ru> | 2021-09-19 17:09:05 +0300 |
commit | f2a0c71bb61e18c967078ec670eb03a29854cbc3 (patch) | |
tree | cc3b913aefb30d1c7d7c59b08f5414b364fe354c | |
parent | e05f848689514bfc142826b1d731eb5526f6ff3d (diff) | |
download | GT5-Unofficial-f2a0c71bb61e18c967078ec670eb03a29854cbc3.tar.gz GT5-Unofficial-f2a0c71bb61e18c967078ec670eb03a29854cbc3.tar.bz2 GT5-Unofficial-f2a0c71bb61e18c967078ec670eb03a29854cbc3.zip |
fix crash when empty flask gets into pyrotheum hatch
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java index 127d4c8407..e0ff04763d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java @@ -44,8 +44,14 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) { - return aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0 - && (this.mRecipeMap == null || GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == this.mLockedFluid); + if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) { + if (this.mRecipeMap == null) + return true; + FluidStack fs = GT_Utility.getFluidForFilledItem(aStack, true); + if (fs != null && fs.getFluid() == this.mLockedFluid) + return true; + } + return false; } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { |