summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-21 18:19:37 +1000
committermd_5 <git@md-5.net>2018-08-21 18:21:11 +1000
commit903c0e30c16c30d99556236ba0cae1bb5a257e1b (patch)
treebfe130ffb08de5914d2d36e9d1451ee176186af0 /src
parent89492315d1b0f6e4c66f0bedb146ab5ea5626e24 (diff)
downloadcraftbukkit-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')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java1
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java1
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());
}