Properly check for recipe inputs. Closes #1803
This commit is contained in:
parent
154dff4cbf
commit
a8eb6f67c0
1 changed files with 5 additions and 6 deletions
|
@ -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<SmeltingRecipe> 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue