0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-25 15:06:14 +00:00
craftbukkit/nms-patches/net/minecraft/world/item/crafting/RecipeStonecutting.patch
2024-10-23 02:15:00 +11:00

35 lines
1.2 KiB
Diff

--- a/net/minecraft/world/item/crafting/RecipeStonecutting.java
+++ b/net/minecraft/world/item/crafting/RecipeStonecutting.java
@@ -7,6 +7,14 @@
import net.minecraft.world.item.crafting.display.SlotDisplay;
import net.minecraft.world.item.crafting.display.StonecutterRecipeDisplay;
+// CraftBukkit start
+import org.bukkit.NamespacedKey;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
+import org.bukkit.craftbukkit.inventory.CraftStonecuttingRecipe;
+import org.bukkit.inventory.Recipe;
+// CraftBukkit end
+
public class RecipeStonecutting extends RecipeSingleItem {
public RecipeStonecutting(String s, RecipeItemStack recipeitemstack, ItemStack itemstack) {
@@ -36,4 +44,16 @@
public RecipeBookCategory recipeBookCategory() {
return RecipeBookCategories.STONECUTTER;
}
+
+ // CraftBukkit start
+ @Override
+ public Recipe toBukkitRecipe(NamespacedKey id) {
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result());
+
+ CraftStonecuttingRecipe recipe = new CraftStonecuttingRecipe(id, result, CraftRecipe.toBukkit(this.input()));
+ recipe.setGroup(this.group());
+
+ return recipe;
+ }
+ // CraftBukkit end
}