mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
MerchantRecipe: add copy constructor
This commit is contained in:
@@ -91,6 +91,13 @@ public class MerchantRecipe implements Recipe {
|
||||
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
|
||||
@Override
|
||||
public ItemStack getResult() {
|
||||
|
Reference in New Issue
Block a user