diff options
author | md_5 <git@md-5.net> | 2018-08-21 18:19:37 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-08-21 18:21:11 +1000 |
commit | 903c0e30c16c30d99556236ba0cae1bb5a257e1b (patch) | |
tree | bfe130ffb08de5914d2d36e9d1451ee176186af0 /src | |
parent | 89492315d1b0f6e4c66f0bedb146ab5ea5626e24 (diff) | |
download | craftbukkit-903c0e30c16c30d99556236ba0cae1bb5a257e1b.tar craftbukkit-903c0e30c16c30d99556236ba0cae1bb5a257e1b.tar.gz craftbukkit-903c0e30c16c30d99556236ba0cae1bb5a257e1b.tar.lz craftbukkit-903c0e30c16c30d99556236ba0cae1bb5a257e1b.tar.xz craftbukkit-903c0e30c16c30d99556236ba0cae1bb5a257e1b.zip |
SPIGOT-4296: Ensure recipe group set in craft translation
Diffstat (limited to 'src')
3 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java index 55e7ea81..a3c3f6e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java @@ -18,7 +18,9 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe { if (recipe instanceof CraftFurnaceRecipe) { return (CraftFurnaceRecipe) recipe; } - return new CraftFurnaceRecipe(recipe.getKey(), recipe.getResult(), recipe.getInput(), recipe.getExperience(), recipe.getCookingTime()); + CraftFurnaceRecipe ret = new CraftFurnaceRecipe(recipe.getKey(), recipe.getResult(), recipe.getInput(), recipe.getExperience(), recipe.getCookingTime()); + ret.setGroup(recipe.getGroup()); + return ret; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java index 8b936761..f83593cb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java @@ -31,6 +31,7 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe { return (CraftShapedRecipe) recipe; } CraftShapedRecipe ret = new CraftShapedRecipe(recipe.getKey(), recipe.getResult()); + ret.setGroup(recipe.getGroup()); String[] shape = recipe.getShape(); ret.shape(shape); Map<Character, ItemStack> ingredientMap = recipe.getIngredientMap(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java index fb0edf11..28582da1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java @@ -31,6 +31,7 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe return (CraftShapelessRecipe) recipe; } CraftShapelessRecipe ret = new CraftShapelessRecipe(recipe.getKey(), recipe.getResult()); + ret.setGroup(recipe.getGroup()); for (ItemStack ingred : recipe.getIngredientList()) { ret.addIngredient(ingred.getType(), ingred.getDurability()); } |