Don't run player loot table for spectators

This commit is contained in:
Jake Potrebic 2024-12-23 17:21:12 -08:00
parent d0d0efee02
commit 920836599a
No known key found for this signature in database
GPG key ID: 27CC63F7CBC866C7

View file

@ -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) + // SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule)
+ this.dropFromLootTable(this.serverLevel(), cause, this.lastHurtByPlayerTime > 0); + this.dropFromLootTable(this.serverLevel(), cause, this.lastHurtByPlayerTime > 0);
+ // Paper - Restore vanilla drops behaviour; custom death loot is a noop on server player, remove. + // Paper - Restore vanilla drops behaviour; custom death loot is a noop on server player, remove.