SPIGOT-4283: Allow setting recipe groups

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-08-17 20:40:54 +10:00
parent 4a4a8c110b
commit 6a88bd220a
6 changed files with 17 additions and 10 deletions

View File

@@ -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);
}