Skip to content

Commit c1c8907

Browse files
committed
chore(merge): update for furnace class cast exception fix
Fixes #4183. Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
2 parents 9f2a749 + 528e321 commit c1c8907

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

forge/src/mixins/java/org/spongepowered/forge/mixin/core/world/level/block/entity/AbstractFurnaceBlockEntityMixin_Forge.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public abstract class AbstractFurnaceBlockEntityMixin_Forge implements AbstractF
121121
final var recipe = entity.bridge$getCurrentRecipe();
122122
final ItemStackSnapshot cooking = ItemStackUtil.snapshotOf(entity.items.get(0));
123123
final CookingEvent.Tick event = SpongeEventFactory.createCookingEventTick(cause, (FurnaceBlockEntity) entityIn, cooking, Optional.of(fuel),
124-
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id()));
124+
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id().location()));
125125
SpongeCommon.post(event);
126126
if (event.isCancelled()) {
127127
return entity.cookingTimer; // dont tick down

neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/level/block/entity/AbstractFurnaceBlockEntityMixin_Neo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public abstract class AbstractFurnaceBlockEntityMixin_Neo extends BaseContainerB
121121
final var recipe = entity.bridge$getCurrentRecipe();
122122
final ItemStackSnapshot cooking = ItemStackUtil.snapshotOf(entity.items.get(0));
123123
final CookingEvent.Tick event = SpongeEventFactory.createCookingEventTick(cause, (FurnaceBlockEntity) entityIn, cooking, Optional.of(fuel),
124-
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id()));
124+
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id().location()));
125125
SpongeCommon.post(event);
126126
if (event.isCancelled()) {
127127
return entity.cookingTimer; // dont tick down

0 commit comments

Comments
 (0)