mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
MerchantRecipe: add copy constructor
This commit is contained in:
parent
c40bddd17f
commit
8fb0d8f90a
1 changed files with 7 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue