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 );
|
super(TRBlockEntities.ELECTRIC_FURNACE );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setInvDirty(boolean isDiry) {
|
private void setInvDirty(boolean isDirty) {
|
||||||
inventory.setChanged(isDiry);
|
inventory.setChanged(isDirty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isInvDirty() {
|
private boolean isInvDirty() {
|
||||||
|
@ -148,8 +148,8 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
||||||
if (inventory.getInvStack(inputSlot).isEmpty()) {
|
if (inventory.getInvStack(inputSlot).isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Optional<SmeltingRecipe> testRecipe = world.getRecipeManager().getFirstMatch(RecipeType.SMELTING, inventory, world);
|
|
||||||
if (!testRecipe.isPresent()) {
|
if (!recipe.matches(inventory, world)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,6 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
||||||
charge(2);
|
charge(2);
|
||||||
|
|
||||||
if (world.isClient) {
|
if (world.isClient) {
|
||||||
setInvDirty(false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue