2024-04-27 04:09:42 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
|
|
Date: Fri, 26 Apr 2024 19:08:37 -0700
|
|
|
|
Subject: [PATCH] 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.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
2024-12-03 22:06:05 +01:00
|
|
|
index 95c2e2d73aefcf7c436fad3066e1fedc7299faa1..5b0dcb27cb862e84478b94184b7a1b97fb2e7501 100644
|
2024-04-27 04:09:42 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
2024-12-03 20:34:55 +01:00
|
|
|
@@ -2436,7 +2436,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
2024-04-27 04:09:42 +02:00
|
|
|
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
|
|
|
|
Entity entity = damagesource.getDirectEntity();
|
|
|
|
|
2024-06-14 11:59:44 +02:00
|
|
|
- if (entity instanceof LivingEntity) {
|
|
|
|
+ if (!damagesource.is(DamageTypeTags.IS_PROJECTILE) && entity instanceof LivingEntity) { // Paper - Fix shield disable inconsistency
|
2024-04-27 04:09:42 +02:00
|
|
|
this.blockUsingShield((LivingEntity) entity);
|
|
|
|
}
|
|
|
|
}
|