From 7f8bd2ab1f16c23be4ce2d01157962bfc97fceb1 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Sun, 18 Aug 2019 15:31:21 +0100 Subject: [PATCH] Fix electric furnace not always turning off --- .../blockentity/machine/tier1/ElectricFurnaceBlockEntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java index f58fd443d..36158573c 100644 --- a/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java @@ -127,6 +127,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity currentRecipe = null; cookTime = 0; cookTimeTotal = 0; + updateState(); } private void updateState() { @@ -134,7 +135,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity if (furnaceBlock instanceof BlockMachineBase) { BlockMachineBase blockMachineBase = (BlockMachineBase) furnaceBlock; - boolean isActive = isActive() || canCraftAgain(); + boolean isActive = currentRecipe != null || canCraftAgain(); blockMachineBase.setActive(isActive, world, pos); } world.updateListeners(pos, world.getBlockState(pos), world.getBlockState(pos), 3); @@ -220,7 +221,6 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity } if (currentRecipe != null && (!hasAllInputs(currentRecipe) || !canAcceptOutput(currentRecipe, outputSlot))) { resetCrafter(); - updateState(); } }