Fix #2811 Iron Furnace recipe reset did not reset progress. Thanks to SimonFlapse

This commit is contained in:
Simon 2022-03-30 11:23:42 +02:00 committed by GitHub
parent ccfeeb42b1
commit fa0b47c0a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,6 +81,8 @@ public class IronFurnaceBlockEntity extends AbstractIronMachineBlockEntity imple
if (lastRecipe != null && RecipeUtils.matchesSingleInput(lastRecipe, stack)) { if (lastRecipe != null && RecipeUtils.matchesSingleInput(lastRecipe, stack)) {
return lastRecipe; return lastRecipe;
} else { } else {
// If the previous recipe does not apply anymore, reset the progress
progress = 0;
Recipe<?> matchingRecipe = RecipeUtils.getMatchingRecipe(world, RecipeType.SMELTING, stack).orElse(null); Recipe<?> matchingRecipe = RecipeUtils.getMatchingRecipe(world, RecipeType.SMELTING, stack).orElse(null);
if (matchingRecipe != null) { if (matchingRecipe != null) {
lastRecipe = matchingRecipe; lastRecipe = matchingRecipe;