blob: 35a86ff378bc0a598d9f409869e0d178dbdbfa35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- a/net/minecraft/world/item/crafting/RecipeHolder.java
+++ b/net/minecraft/world/item/crafting/RecipeHolder.java
@@ -1,10 +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 final Recipe toBukkitRecipe() {
+ return this.value.toBukkitRecipe(CraftNamespacedKey.fromMinecraft(this.id));
+ }
+ // CraftBukkit end
+
public boolean equals(Object object) {
if (this == object) {
return true;
|