Fix Electric Furnace not checking if there is room for the outputs

This commit is contained in:
modmuss50 2019-08-18 15:13:49 +01:00
parent f53d65ca48
commit 64b3441d6d

View file

@ -89,7 +89,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
cookTimeTotal = Math.max((int) (currentRecipe.getCookTime() * (1.0 - getSpeedMultiplier())), 1); cookTimeTotal = Math.max((int) (currentRecipe.getCookTime() * (1.0 - getSpeedMultiplier())), 1);
updateState(); updateState();
} }
private boolean canAcceptOutput(SmeltingRecipe recipe, int slot) { private boolean canAcceptOutput(SmeltingRecipe recipe, int slot) {
ItemStack recipeOutput = recipe.getOutput(); ItemStack recipeOutput = recipe.getOutput();
if (recipeOutput.isEmpty()) { if (recipeOutput.isEmpty()) {
@ -218,7 +218,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
if (currentRecipe == null) { if (currentRecipe == null) {
updateCurrentRecipe(); updateCurrentRecipe();
} }
if (currentRecipe != null && !hasAllInputs(currentRecipe)) { if (currentRecipe != null && (!hasAllInputs(currentRecipe) || !canAcceptOutput(currentRecipe, outputSlot))) {
resetCrafter(); resetCrafter();
updateState(); updateState();
} }