Skip to content

Commit c6e7ebc

Browse files
committedMar 17, 2025··
re-add missed distance check
1 parent 28fbc7b commit c6e7ebc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch

+2-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,8 @@
666666
float f = blocksAttacks.resolveBlockedDamage(damageSource, damageAmount, acos);
667667
+ if (!dryRun) { // Paper
668668
blocksAttacks.hurtBlockingItem(this.level(), itemBlockingWith, this, this.getUsedItemHand(), f);
669-
if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && damageSource.getDirectEntity() instanceof LivingEntity livingEntity) {
669+
- if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && damageSource.getDirectEntity() instanceof LivingEntity livingEntity) {
670+
+ if (!damageSource.is(DamageTypeTags.IS_PROJECTILE) && damageSource.getDirectEntity() instanceof LivingEntity livingEntity && livingEntity.distanceToSqr(this) <= (200.0D * 200.0D)) { // Paper - Fix shield disable inconsistency & Check distance in entity interactions
670671
this.blockUsingItem(level, livingEntity);
671672
}
672673
+ } // Paper

0 commit comments

Comments
 (0)
Please sign in to comment.