mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
SPIGOT-4296: Ensure recipe group set in craft translation
This commit is contained in:
parent
89492315d1
commit
903c0e30c1
3 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,9 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe {
|
||||||
if (recipe instanceof CraftFurnaceRecipe) {
|
if (recipe instanceof CraftFurnaceRecipe) {
|
||||||
return (CraftFurnaceRecipe) recipe;
|
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
|
@Override
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe {
|
||||||
return (CraftShapedRecipe) recipe;
|
return (CraftShapedRecipe) recipe;
|
||||||
}
|
}
|
||||||
CraftShapedRecipe ret = new CraftShapedRecipe(recipe.getKey(), recipe.getResult());
|
CraftShapedRecipe ret = new CraftShapedRecipe(recipe.getKey(), recipe.getResult());
|
||||||
|
ret.setGroup(recipe.getGroup());
|
||||||
String[] shape = recipe.getShape();
|
String[] shape = recipe.getShape();
|
||||||
ret.shape(shape);
|
ret.shape(shape);
|
||||||
Map<Character, ItemStack> ingredientMap = recipe.getIngredientMap();
|
Map<Character, ItemStack> ingredientMap = recipe.getIngredientMap();
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe
|
||||||
return (CraftShapelessRecipe) recipe;
|
return (CraftShapelessRecipe) recipe;
|
||||||
}
|
}
|
||||||
CraftShapelessRecipe ret = new CraftShapelessRecipe(recipe.getKey(), recipe.getResult());
|
CraftShapelessRecipe ret = new CraftShapelessRecipe(recipe.getKey(), recipe.getResult());
|
||||||
|
ret.setGroup(recipe.getGroup());
|
||||||
for (ItemStack ingred : recipe.getIngredientList()) {
|
for (ItemStack ingred : recipe.getIngredientList()) {
|
||||||
ret.addIngredient(ingred.getType(), ingred.getDurability());
|
ret.addIngredient(ingred.getType(), ingred.getDurability());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue