mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Fix shield disable inconsistency
In vanilla, if the damage source is tagged as a projectile, it will not disable the shield if the attacker is holding an axe item.
This commit is contained in:
parent
3844905fa8
commit
ba71d372a5
1 changed files with 1 additions and 1 deletions
|
@ -1216,7 +1216,7 @@
|
||||||
+ this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
|
+ this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
|
||||||
+ Entity entity = damagesource.getDirectEntity();
|
+ Entity entity = damagesource.getDirectEntity();
|
||||||
+
|
+
|
||||||
+ if (entity instanceof LivingEntity) {
|
+ if (!damagesource.is(DamageTypeTags.IS_PROJECTILE) && entity instanceof LivingEntity) { // Paper - Fix shield disable inconsistency
|
||||||
+ this.blockUsingShield((LivingEntity) entity);
|
+ this.blockUsingShield((LivingEntity) entity);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue