Skip to content

Commit

Permalink
fixed a blast furnace booster crash
Browse files Browse the repository at this point in the history
closes #373
  • Loading branch information
Ellpeck committed Nov 20, 2024
1 parent 2c8a615 commit a4f9dd0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public void tick() {
if (!(below instanceof BlastFurnaceBlockEntity tile))
return;
var input = new SingleRecipeInput(tile.getItem(0));
Recipe<?> recipe = this.level.getRecipeManager().getRecipeFor(BlockEntityFurnaceHeater.getRecipeType(tile), input, this.level).orElse(null).value();
var recipe = this.level.getRecipeManager().getRecipeFor(BlockEntityFurnaceHeater.getRecipeType(tile), input, this.level).orElse(null);
if (recipe == null)
return;
if (!this.isApplicable(recipe.getIngredients()))
if (!this.isApplicable(recipe.value().getIngredients()))
return;

var data = BlockEntityFurnaceHeater.getFurnaceData(tile);
Expand All @@ -59,7 +59,7 @@ public void tick() {
return;

if (output.isEmpty()) {
var result = recipe.getResultItem(this.level.registryAccess());
var result = recipe.value().getResultItem(this.level.registryAccess());
tile.setItem(2, result.copy());
} else {
output.grow(1);
Expand Down

0 comments on commit a4f9dd0

Please sign in to comment.