From 32587ed8e7e349f7f4d374541a2de9a7982f33d3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 1 Mar 2016 14:13:42 +1100 Subject: [PATCH] SPIGOT-1545: Populate Vanilla villager trades correctly. --- .../org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java index 964f7080a1..0e029a95ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java @@ -10,8 +10,10 @@ public class CraftMerchantRecipe extends MerchantRecipe { private final net.minecraft.server.MerchantRecipe handle; public CraftMerchantRecipe(net.minecraft.server.MerchantRecipe merchantRecipe) { - super(null, 0); + super(CraftItemStack.asBukkitCopy(merchantRecipe.sellingItem), 0); this.handle = merchantRecipe; + addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.buyingItem1)); + addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.buyingItem2)); } public CraftMerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward) {