@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/world/item/crafting/ShapedRecipes.java
|
||||
+++ b/net/minecraft/world/item/crafting/ShapedRecipes.java
|
||||
@@ -24,6 +24,13 @@
|
||||
import net.minecraft.world.item.Items;
|
||||
@@ -18,6 +18,14 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import org.apache.commons.lang3.NotImplementedException;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftShapedRecipe;
|
||||
@@ -14,14 +15,15 @@
|
||||
public class ShapedRecipes implements RecipeCrafting {
|
||||
|
||||
final int width;
|
||||
@@ -50,6 +57,67 @@
|
||||
this(minecraftkey, s, craftingbookcategory, i, j, nonnulllist, itemstack, true);
|
||||
@@ -42,6 +50,68 @@
|
||||
this(s, craftingbookcategory, i, j, nonnulllist, itemstack, true);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public org.bukkit.inventory.ShapedRecipe toBukkitRecipe() {
|
||||
+ @Override
|
||||
+ public org.bukkit.inventory.ShapedRecipe toBukkitRecipe(NamespacedKey id) {
|
||||
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
||||
+ CraftShapedRecipe recipe = new CraftShapedRecipe(result, this);
|
||||
+ CraftShapedRecipe recipe = new CraftShapedRecipe(id, result, this);
|
||||
+ recipe.setGroup(this.group);
|
||||
+ recipe.setCategory(CraftRecipe.getCategory(this.category()));
|
||||
+
|
||||
@@ -80,5 +82,5 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
@Override
|
||||
public MinecraftKey getId() {
|
||||
return this.id;
|
||||
public RecipeSerializer<?> getSerializer() {
|
||||
return RecipeSerializer.SHAPED_RECIPE;
|
||||
|
||||
Reference in New Issue
Block a user