mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 11:27:35 +01:00
MerchantRecipe: add copy constructor
This commit is contained in:
parent
c40bddd17f
commit
8fb0d8f90a
@ -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 New Issue
Block a user