@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/world/item/crafting/ShapelessRecipes.java
|
||||
+++ b/net/minecraft/world/item/crafting/ShapelessRecipes.java
|
||||
@@ -15,6 +15,12 @@
|
||||
@@ -14,6 +14,13 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.World;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftRecipe;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe;
|
||||
@@ -12,16 +13,17 @@
|
||||
+
|
||||
public class ShapelessRecipes implements RecipeCrafting {
|
||||
|
||||
private final MinecraftKey id;
|
||||
@@ -31,6 +37,21 @@
|
||||
final String group;
|
||||
@@ -28,6 +35,22 @@
|
||||
this.ingredients = nonnulllist;
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe() {
|
||||
+ @Override
|
||||
+ public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe(NamespacedKey id) {
|
||||
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
||||
+ CraftShapelessRecipe recipe = new CraftShapelessRecipe(result, this);
|
||||
+ CraftShapelessRecipe recipe = new CraftShapelessRecipe(id, result, this);
|
||||
+ recipe.setGroup(this.group);
|
||||
+ recipe.setCategory(CraftRecipe.getCategory(this.category()));
|
||||
+
|
||||
@@ -33,5 +35,5 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
@Override
|
||||
public MinecraftKey getId() {
|
||||
return this.id;
|
||||
public RecipeSerializer<?> getSerializer() {
|
||||
return RecipeSerializer.SHAPELESS_RECIPE;
|
||||
|
||||
Reference in New Issue
Block a user