From 833956bf3449af460ab05057a7aa10950035ffa1 Mon Sep 17 00:00:00 2001 From: BlueWeabo Date: Tue, 25 Jul 2023 23:22:56 +0300 Subject: [PATCH] fix moc crashing when being placed (#347) Former-commit-id: 83e664bd0a83101b403a4dfc8f16a6fdf5534ba2 --- .../multis/mega/GT_TileEntity_MegaOilCracker.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java index db4140765..e428debe4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java @@ -29,6 +29,8 @@ import java.util.ArrayList; import java.util.List; +import javax.annotation.Nonnull; + import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.ForgeDirection; @@ -50,6 +52,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; +import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; @@ -183,8 +186,14 @@ public GT_Recipe.GT_Recipe_Map getRecipeMap() { @Override protected ProcessingLogic createProcessingLogic() { - return new ProcessingLogic().setMaxParallel(ConfigHandler.megaMachinesMax) - .setEuModifier(1.0F - Math.min(0.1F * (heatLevel.getTier() + 1), 0.5F)); + return new ProcessingLogic() { + + @Nonnull + public CheckRecipeResult process() { + setEuModifier(1.0F - Math.min(0.1F * (heatLevel.getTier() + 1), 0.5F)); + return super.process(); + } + }.setMaxParallel(ConfigHandler.megaMachinesMax); } public HeatingCoilLevel getCoilLevel() {