diff options
6 files changed, 17 insertions, 10 deletions
diff --git a/nms-patches/FurnaceRecipe.patch b/nms-patches/FurnaceRecipe.patch index 30eb77a1..4d150e73 100644 --- a/nms-patches/FurnaceRecipe.patch +++ b/nms-patches/FurnaceRecipe.patch @@ -11,7 +11,7 @@ public class FurnaceRecipe implements IRecipe { -@@ -56,6 +60,16 @@ +@@ -56,6 +60,19 @@ return this.key; } @@ -22,13 +22,16 @@ + list.buildChoices(); + net.minecraft.server.ItemStack stack = list.choices[0]; + -+ return new CraftFurnaceRecipe(CraftNamespacedKey.fromMinecraft(this.key), result, CraftItemStack.asCraftMirror(stack), this.experience, this.cookingTime); ++ CraftFurnaceRecipe recipe = new CraftFurnaceRecipe(CraftNamespacedKey.fromMinecraft(this.key), result, CraftItemStack.asCraftMirror(stack), this.experience, this.cookingTime); ++ recipe.setGroup(this.group); ++ ++ return recipe; + } + public static class a implements RecipeSerializer<FurnaceRecipe> { public a() {} -@@ -106,11 +120,11 @@ +@@ -106,11 +123,11 @@ return "smelting"; } diff --git a/nms-patches/ShapedRecipes.patch b/nms-patches/ShapedRecipes.patch index b68788a1..d38a490e 100644 --- a/nms-patches/ShapedRecipes.patch +++ b/nms-patches/ShapedRecipes.patch @@ -11,7 +11,7 @@ public class ShapedRecipes implements IRecipe { -@@ -32,6 +36,64 @@ +@@ -32,6 +36,66 @@ this.result = itemstack; } @@ -19,6 +19,8 @@ + public org.bukkit.inventory.ShapedRecipe toBukkitRecipe() { + CraftItemStack result = CraftItemStack.asCraftMirror(this.result); + CraftShapedRecipe recipe = new CraftShapedRecipe(result, this); ++ recipe.setGroup(this.f); ++ + switch (this.height) { + case 1: + switch (this.width) { @@ -76,7 +78,7 @@ public MinecraftKey getKey() { return this.e; } -@@ -302,11 +364,11 @@ +@@ -302,11 +366,11 @@ packetdataserializer.a(shapedrecipes.result); } diff --git a/nms-patches/ShapelessRecipes.patch b/nms-patches/ShapelessRecipes.patch index 9f214f4c..1b5c2636 100644 --- a/nms-patches/ShapelessRecipes.patch +++ b/nms-patches/ShapelessRecipes.patch @@ -11,7 +11,7 @@ public class ShapelessRecipes implements IRecipe { -@@ -20,6 +24,20 @@ +@@ -20,6 +24,22 @@ this.ingredients = nonnulllist; } @@ -20,6 +20,8 @@ + public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe() { + CraftItemStack result = CraftItemStack.asCraftMirror(this.result); + CraftShapelessRecipe recipe = new CraftShapelessRecipe(result, this); ++ recipe.setGroup(this.b); ++ + for (RecipeItemStack list : this.ingredients) { + list.buildChoices(); + net.minecraft.server.ItemStack stack = list.choices[0]; @@ -32,7 +34,7 @@ public MinecraftKey getKey() { return this.a; } -@@ -127,11 +145,11 @@ +@@ -127,11 +147,11 @@ packetdataserializer.a(shapelessrecipes.result); } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java index b513f8d2..55e7ea81 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java @@ -26,6 +26,6 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe { ItemStack result = this.getResult(); RecipeItemStack input = new RecipeItemStack(Stream.of(new RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(this.getInput())))); - MinecraftServer.getServer().getCraftingManager().a(new net.minecraft.server.FurnaceRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), "", input, CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); + MinecraftServer.getServer().getCraftingManager().a(new net.minecraft.server.FurnaceRecipe(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), input, CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java index efd0e76a..8b936761 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java @@ -56,6 +56,6 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe { } } - MinecraftServer.getServer().getCraftingManager().a(new ShapedRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), "", width, shape.length, data, CraftItemStack.asNMSCopy(this.getResult()))); + MinecraftServer.getServer().getCraftingManager().a(new ShapedRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), width, shape.length, data, CraftItemStack.asNMSCopy(this.getResult()))); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java index dbbcb679..fb0edf11 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java @@ -44,6 +44,6 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe data.set(i, new RecipeItemStack(Stream.of(new RecipeItemStack.StackProvider(CraftItemStack.asNMSCopy(ingred.get(i)))))); } - MinecraftServer.getServer().getCraftingManager().a(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), "", CraftItemStack.asNMSCopy(this.getResult()), data)); + MinecraftServer.getServer().getCraftingManager().a(new ShapelessRecipes(CraftNamespacedKey.toMinecraft(this.getKey()), this.getGroup(), CraftItemStack.asNMSCopy(this.getResult()), data)); } } |