Scissors/patches/removed/0033-Do-not-attempt-to-cast-items-to-recipes.patch
Telesphoreo 6b23f8bc8f Begin work on 1.19.3
Only got through one patch as of now. Not publishing JARs to Jenkins for now
2022-12-10 22:28:09 -06:00

25 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Allink <arclicious@vivaldi.net>
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 8847a3b3cec47bd36670b77cedab4ef66a8c9270..b07757bbaf61303368763c681b4096f730e17a4c 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<ResourceLocation> 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
});