mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-28 10:42:04 -07:00
MerchantRecipe: add copy constructor
This commit is contained in:
@@ -91,6 +91,13 @@ public class MerchantRecipe implements Recipe {
|
|||||||
this.specialPrice = specialPrice;
|
this.specialPrice = specialPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Paper start - add copy ctor
|
||||||
|
public MerchantRecipe(@NotNull MerchantRecipe recipe) {
|
||||||
|
this(recipe.result.clone(), recipe.uses, recipe.maxUses, recipe.experienceReward, recipe.villagerExperience, recipe.priceMultiplier, recipe.demand, recipe.specialPrice, recipe.ignoreDiscounts);
|
||||||
|
this.setIngredients(recipe.ingredients);
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getResult() {
|
public ItemStack getResult() {
|
||||||
|
Reference in New Issue
Block a user