From a8eb6f67c0847cdb3b7df9383da6ddfa7444c888 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Thu, 22 Aug 2019 02:45:26 +0300 Subject: [PATCH] Properly check for recipe inputs. Closes #1803 --- .../machine/tier1/ElectricFurnaceBlockEntity.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java index 36158573c..c789eba41 100644 --- a/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/ElectricFurnaceBlockEntity.java @@ -63,8 +63,8 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity super(TRBlockEntities.ELECTRIC_FURNACE ); } - private void setInvDirty(boolean isDiry) { - inventory.setChanged(isDiry); + private void setInvDirty(boolean isDirty) { + inventory.setChanged(isDirty); } private boolean isInvDirty() { @@ -148,11 +148,11 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity if (inventory.getInvStack(inputSlot).isEmpty()) { return false; } - Optional testRecipe = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, inventory, world); - if (!testRecipe.isPresent()) { + + if (!recipe.matches(inventory, world)) { return false; } - + return true; } @@ -204,7 +204,6 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity charge(2); if (world.isClient) { - setInvDirty(false); return; }