From a07371fed1cd9114bd1e316089c304b1af26290a Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Mon, 25 Jul 2022 19:21:31 +0200 Subject: [PATCH] Fix custom merchant trade event world reference --- .../server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch index 4d76175a6b..50bb1c33b0 100644 --- a/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch +++ b/patches/server/Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch @@ -235,7 +235,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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);