diff options
-rw-r--r-- | paper-server/patches/sources/net/minecraft/world/inventory/MerchantResultSlot.java.patch | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/MerchantResultSlot.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantResultSlot.java.patch index ceb2902468..66df3c79f6 100644 --- a/paper-server/patches/sources/net/minecraft/world/inventory/MerchantResultSlot.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantResultSlot.java.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/world/inventory/MerchantResultSlot.java +++ b/net/minecraft/world/inventory/MerchantResultSlot.java -@@ -47,13 +_,32 @@ +@@ -47,13 +_,34 @@ @Override public void onTake(Player player, ItemStack stack) { @@ -19,6 +19,8 @@ + if (!event.callEvent()) { + stack.setCount(0); + event.getPlayer().updateInventory(); ++ int level = merchant instanceof net.minecraft.world.entity.npc.Villager villager ? villager.getVillagerData().getLevel() : 1; ++ serverPlayer.sendMerchantOffers(player.containerMenu.containerId, merchant.getOffers(), level, merchant.getVillagerXp(), merchant.showProgressBar(), merchant.canRestock()); + return; + } + activeOffer = org.bukkit.craftbukkit.inventory.CraftMerchantRecipe.fromBukkit(event.getTrade()).toMinecraft(); |