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:
Jake Potrebic 2024-04-26 19:08:37 -07:00
parent 3844905fa8
commit ba71d372a5

View file

@ -1216,7 +1216,7 @@
+ this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
+ 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);
+ }
+ }