diff options
author | Bjarne Koll <[email protected]> | 2024-07-08 21:20:18 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-07-08 21:20:18 +0200 |
commit | 70b0e844767131681400b3dbace06c2dea13f87c (patch) | |
tree | 348a906a41e2dfc712c1899d5279100726051ed8 /patches/server/1023-Properly-resend-entities.patch | |
parent | 62ed302bf400a21b601bdb9382325eab31612f32 (diff) | |
download | Paper-70b0e844767131681400b3dbace06c2dea13f87c.tar.gz Paper-70b0e844767131681400b3dbace06c2dea13f87c.zip |
Properly apply damage tick after absorption (#11043)
The logic in place to prevent players from processing a damage
tick/knockback/etc when hit with 0 damage incorrectly used the damage
events final damage value, which is reduced by absorption.
Instead, use the event's "raw damage", e.g. the amount passed to hurt,
in order to determine if the damage tick should be skipped.
This still allows plugins to change the damage to a non-zero value and
properly damage ticks the player in such a case, but correctly processes
the damage tick in cases where the original damage is non zero but the
actual damage is.
Diffstat (limited to 'patches/server/1023-Properly-resend-entities.patch')
-rw-r--r-- | patches/server/1023-Properly-resend-entities.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/1023-Properly-resend-entities.patch b/patches/server/1023-Properly-resend-entities.patch index e1758c36c6..49917da8c7 100644 --- a/patches/server/1023-Properly-resend-entities.patch +++ b/patches/server/1023-Properly-resend-entities.patch @@ -166,10 +166,10 @@ index f1fb4e830c6720d09b22056e3d0b9a08fe2bd472..83f3ffdd8fa901b3de580d2359cdb5ea public boolean equals(Object object) { return object instanceof Entity ? ((Entity) object).id == this.id : false; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 226148e763a9d63ac340a0b4dc07db3e3c5663b6..77d2d93966b99f3dfa2b47a505db74dd2dacfb1e 100644 +index 6e5af47f5d2775c1afc4914342c3d0ea6569c792..c5ca9fa86b940c6b5a54b05ff1bb3d0a300d60b2 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3880,6 +3880,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3879,6 +3879,11 @@ public abstract class LivingEntity extends Entity implements Attackable { return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; } |