diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/item/crafting/RecipeHolder.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/item/crafting/RecipeHolder.java.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/crafting/RecipeHolder.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/crafting/RecipeHolder.java.patch new file mode 100644 index 0000000000..d7bfcda029 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/crafting/RecipeHolder.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/world/item/crafting/RecipeHolder.java ++++ b/net/minecraft/world/item/crafting/RecipeHolder.java +@@ -1,9 +1,17 @@ + package net.minecraft.world.item.crafting; + + import net.minecraft.resources.ResourceLocation; ++// CraftBukkit start ++import org.bukkit.craftbukkit.util.CraftNamespacedKey; ++import org.bukkit.inventory.Recipe; + +-public record RecipeHolder<T extends Recipe<?>>(ResourceLocation id, T value) { +- @Override ++public record RecipeHolder<T extends net.minecraft.world.item.crafting.Recipe<?>>(ResourceLocation id, T value) { ++ ++ public final Recipe toBukkitRecipe() { ++ return this.value.toBukkitRecipe(CraftNamespacedKey.fromMinecraft(this.id)); ++ } ++ // CraftBukkit end ++ + public boolean equals(Object object) { + if (this == object) { + return true; |