Paper/paper-server/patches/sources/net/minecraft
Bjarne Koll d648e75653 Correctly shrink items during EntityResurrectEvent
The EntityResurrectEvent logic is supposed to locate a totem of undying
in any of the interaction slots of the player inventory and then, if the
called EntityResurrectEvent is not cancelled, shrink that item by 1,
usually reducing it to zero.

For this, the logic iterates over the items in the interaction slots and
breaks out the loop if a totem of undying was found.
However, even if no totem of undying was found, the iteration item stack
variable remains as a refernce to the last interaction slot probed.

Plugins uncancelling a EntityResurrectEvent, which is published
pre-cancelled to listeners if no totem of undying could be found,
would hence cause the server logic to shrink completely unrelated items
found in, at the writing of this patch, the players off hand slot.

This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled.
2023-01-10 21:06:42 +01:00
..
advancements Improve logging and errors 2022-12-14 15:52:11 -08:00
commands Fix EntityArgument and EntitySelectorParser permissions to align with EntitySelector#checkPermissions 2022-10-26 13:13:12 -07:00
core Fire CauldronLevelChange on initial fill 2022-03-29 13:46:23 -07:00
nbt Reduce memory footprint of CompoundTag 2020-04-06 17:39:25 -07:00
network Fix premature player kicks on shutdown 2024-04-11 16:37:44 +01:00
resources Sanitize ResourceLocation error logging 2021-08-26 12:09:47 +02:00
server Use single player info update packet on join 2023-01-08 17:38:28 -08:00
stats
util Validate usernames 2022-01-01 05:19:37 -08:00
world Correctly shrink items during EntityResurrectEvent 2023-01-10 21:06:42 +01:00
ChatFormatting.java.patch
CrashReport.java.patch Deobfuscate stacktraces in log messages, crash reports, and etc. 2021-06-20 18:19:09 -07:00
CrashReportCategory.java.patch Deobfuscate stacktraces in log messages, crash reports, and etc. 2021-06-20 18:19:09 -07:00
Util.java.patch Remove client-side code using deprecated for removal AccessController 2021-11-26 15:09:58 -08:00