diff --git a/patches/server/0542-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0542-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch index aa909b26d1..e02f2667cb 100644 --- a/patches/server/0542-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch +++ b/patches/server/0542-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch @@ -219,7 +219,7 @@ index d41f44ed2e497ba3373d170c08488b49e88334c4..d3a99ba6f3085ad12b67ddc94cc4ab39 void notifyTradeUpdated(ItemStack stack); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java -index 257776a12ca26c1e75be22a67c94b0aa012fd687..02fc14d84df08d9e0418691f6c6b71f013e16365 100644 +index 257776a12ca26c1e75be22a67c94b0aa012fd687..5074e8b2259b3fb969bd0ff99c296b7537920273 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java @@ -74,10 +74,25 @@ public class CraftMerchantCustom extends CraftMerchant { @@ -235,7 +235,7 @@ index 257776a12ca26c1e75be22a67c94b0aa012fd687..02fc14d84df08d9e0418691f6c6b71f0 + merchantRecipe.increaseUses(); + } + if (event == null || event.isRewardingExp()) { -+ this.tradingWorld.addFreshEntity(new net.minecraft.world.entity.ExperienceOrb(tradingWorld, tradingPlayer.getX(), tradingPlayer.getY(), tradingPlayer.getZ(), merchantRecipe.getXp(), org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.tradingPlayer, null)); ++ this.tradingPlayer.level.addFreshEntity(new net.minecraft.world.entity.ExperienceOrb(tradingPlayer.level, tradingPlayer.getX(), tradingPlayer.getY(), tradingPlayer.getZ(), merchantRecipe.getXp(), org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.tradingPlayer, null)); + } + } + this.notifyTrade(merchantRecipe);