From 920836599a643eb135bc7c61f2134fe85c946325 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Mon, 23 Dec 2024 17:21:12 -0800 Subject: [PATCH] Don't run player loot table for spectators --- .../sources/net/minecraft/server/level/ServerPlayer.java.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch index c32e052b23..a272c93f9a 100644 --- a/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch +++ b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch @@ -385,7 +385,7 @@ + } + } + } -+ if (this.shouldDropLoot() && this.serverLevel().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - fix player loottables running when mob loot gamerule is false ++ if (!this.isSpectator() && this.shouldDropLoot() && this.serverLevel().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper - fix player loottables running when mob loot gamerule is false + // SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule) + this.dropFromLootTable(this.serverLevel(), cause, this.lastHurtByPlayerTime > 0); + // Paper - Restore vanilla drops behaviour; custom death loot is a noop on server player, remove.