PaperMC/paper-server/patches/sources/net/minecraft/world/entity
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
..
ai Limit pet look distance 2022-12-06 18:45:54 +01:00
ambient Climbing should not bypass cramming gamerule 2020-08-23 20:59:00 +02:00
animal Add EntityToggleSitEvent 2022-03-11 15:33:10 +00:00
boss Allow changing the EnderDragon podium 2022-04-03 11:31:42 -04:00
decoration Fix a bunch of vanilla bugs 2022-07-11 11:56:41 -07:00
item Don't use level random in entity constructors 2022-07-10 14:13:22 -07:00
monster Add config option for spider worldborder climbing 2022-10-27 15:35:47 +02:00
npc More vanilla friendly methods to update trades 2022-10-16 16:12:49 +02:00
player Flying Fall Damage 2022-05-27 02:26:08 -06:00
projectile Stop large look changes from crashing the server 2022-08-24 09:54:11 -04:00
raid EntityPickupItemEvent fixes 2022-07-04 21:45:36 -07:00
vehicle Friction API 2021-09-15 20:44:22 +02:00
AgeableMob.java.patch Honor EntityAgeable.ageLock 2018-09-23 20:59:53 -05:00
AreaEffectCloud.java.patch Entity Activation Range 2024-11-02 18:16:11 +11:00
ConversionParams.java.patch Add EntityZapEvent 2016-10-16 23:19:30 -07:00
ConversionType.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
Entity.java.patch Expose pre-collision moving velocity to VehicleBlockCollisionEvent 2022-10-11 23:30:32 +03:00
EntitySelector.java.patch Ability to control player's insomnia and phantoms 2022-01-22 17:56:19 +01:00
EntityType.java.patch config for disabling entity tag tags 2021-09-15 14:52:42 -07:00
ExperienceOrb.java.patch Fix NBT type issues 2018-08-03 00:04:54 -04:00
Interaction.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
ItemBasedSteering.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
Leashable.java.patch Expand EntityUnleashEvent 2021-01-29 15:13:11 +01:00
LightningBolt.java.patch Fire EntityChangeBlockEvent in more places 2021-08-09 20:45:46 -07:00
LivingEntity.java.patch Correctly shrink items during EntityResurrectEvent 2023-01-10 21:06:42 +01:00
Mob.java.patch Expand EntityUnleashEvent 2021-01-29 15:13:11 +01:00
NeutralMob.java.patch Prevent entity loading causing async lookups 2022-03-06 11:09:09 -05:00
OminousItemSpawner.java.patch Fixes and additions to the spawn reason API 2019-03-24 00:24:52 -04:00
PathfinderMob.java.patch Remap CraftBukkit to Mojang+Yarn Mappings 2024-12-11 22:26:55 +01:00
TamableAnimal.java.patch Add EntityToggleSitEvent 2022-03-11 15:33:10 +00:00