mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 17:27:41 +01:00
SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe
By: md_5 <git@md-5.net>
This commit is contained in:
parent
159ae52462
commit
5d713025af
@ -2,8 +2,6 @@ package org.bukkit.craftbukkit.inventory;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import java.util.List;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.MerchantRecipe;
|
||||
|
||||
@ -18,6 +16,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
|
||||
addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.costB));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public CraftMerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward, int experience, float priceMultiplier) {
|
||||
this(result, uses, maxUses, experienceReward, experience, priceMultiplier, 0, 0);
|
||||
}
|
||||
@ -123,7 +122,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
|
||||
if (recipe instanceof CraftMerchantRecipe) {
|
||||
return (CraftMerchantRecipe) recipe;
|
||||
} else {
|
||||
CraftMerchantRecipe craft = new CraftMerchantRecipe(recipe.getResult(), recipe.getUses(), recipe.getMaxUses(), recipe.hasExperienceReward(), recipe.getVillagerExperience(), recipe.getPriceMultiplier());
|
||||
CraftMerchantRecipe craft = new CraftMerchantRecipe(recipe.getResult(), recipe.getUses(), recipe.getMaxUses(), recipe.hasExperienceReward(), recipe.getVillagerExperience(), recipe.getPriceMultiplier(), recipe.getDemand(), recipe.getSpecialPrice());
|
||||
craft.setIngredients(recipe.getIngredients());
|
||||
|
||||
return craft;
|
||||
|
Loading…
Reference in New Issue
Block a user