SPIGOT-4296: Ensure recipe group set in craft translation

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2018-08-21 18:19:37 +10:00
parent d54bf8e32b
commit 827d433b65
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

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

View File

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