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 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";
}