diff options
author | Alkalus <draknyte1@hotmail.com> | 2018-03-02 14:02:03 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 14:02:03 +1000 |
commit | e21a47f596f194253d17c4a85ab2e5e8b9a4f256 (patch) | |
tree | ec4c2af1751acac870d6894c20e5b30c4ed978d6 /src/Java | |
parent | 04210cce5ade5d59182efbe340fa89a9e7ff678d (diff) | |
parent | 30542d74e14bd1d374025967e954d588d1a9d927 (diff) | |
download | GT5-Unofficial-e21a47f596f194253d17c4a85ab2e5e8b9a4f256.tar.gz GT5-Unofficial-e21a47f596f194253d17c4a85ab2e5e8b9a4f256.tar.bz2 GT5-Unofficial-e21a47f596f194253d17c4a85ab2e5e8b9a4f256.zip |
Merge pull request #226 from codewarrior0/patch-4
$ Fix multiblocks not forming on server startup.
$ Guard against null outputs in canBufferOutput().
Diffstat (limited to 'src/Java')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index c96b9efc8b..563cad1ee1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -169,6 +169,7 @@ GT_MetaTileEntity_MultiBlockBase { int slotsNeeded = aRecipe.mOutputs.length; for (final ItemStack tRecipeOutput: aRecipe.mOutputs) { + if (tRecipeOutput == null) continue; int amount = tRecipeOutput.stackSize * aParallelRecipes; for (final ItemStack tBusStack : tBusStacks) { if (GT_Utility.areStacksEqual(tBusStack, tRecipeOutput)) { @@ -184,6 +185,7 @@ GT_MetaTileEntity_MultiBlockBase { // For each output fluid, make sure an output hatch can accept it. for (FluidStack tRecipeFluid: aRecipe.mFluidOutputs) { + if (tRecipeFluid == null) continue; boolean tCanBufferFluid = false; int tRecipeAmount = tRecipeFluid.amount; for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) { @@ -422,7 +424,7 @@ GT_MetaTileEntity_MultiBlockBase { } if (aBaseMetaTileEntity.isServerSide()) { - if (mUpdate == 0 || --this.mStartUpCheck == 0) { + if (mUpdate == 0 || this.mStartUpCheck == 0) { this.mChargeHatches.clear(); this.mDischargeHatches.clear(); } |