From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Allink Date: Sun, 10 Jul 2022 02:55:33 +0100 Subject: [PATCH] Do not attempt to cast items to recipes diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java index 2a005e837108d1879da31e8054afbbd6bf7b175e..97bcfb36a37eb7d889d6233e7de9b7b53c8a8a5c 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -648,6 +648,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit Entry entry = (Entry) objectiterator.next(); worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((irecipe) -> { + // Scissors start - Do not attempt to cast items to recipes + if (!(irecipe instanceof AbstractCookingRecipe)) + { + return; + } + // Scissors end + list.add(irecipe); AbstractFurnaceBlockEntity.createExperience(worldserver, vec3d, entry.getIntValue(), ((AbstractCookingRecipe) irecipe).getExperience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit });