2022-07-28 03:57:50 +00:00
|
|
|
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
|
2022-12-11 06:04:11 +00:00
|
|
|
index f734cba350ed85dbbf52ff527c9bb14b9eb04c86..68912cc2bd670944465e6819d82c4aad6b7b324a 100644
|
2022-07-28 03:57:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
2022-12-11 06:04:11 +00:00
|
|
|
@@ -642,6 +642,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
2022-07-28 03:57:50 +00:00
|
|
|
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
|
|
|
|
});
|