From 2cd8c461af74f0a524878dcdffba86cd105c48c6 Mon Sep 17 00:00:00 2001 From: Jakub Zacek Date: Mon, 15 Jul 2024 23:35:51 +0200 Subject: Add OMINOUS_ITEM_SPAWNER SpawnReason (#10897) --- .../0961-Fix-shield-disable-inconsistency.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/server/0961-Fix-shield-disable-inconsistency.patch (limited to 'patches/server/0961-Fix-shield-disable-inconsistency.patch') diff --git a/patches/server/0961-Fix-shield-disable-inconsistency.patch b/patches/server/0961-Fix-shield-disable-inconsistency.patch new file mode 100644 index 0000000000..25f666c8ec --- /dev/null +++ b/patches/server/0961-Fix-shield-disable-inconsistency.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +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 +index cbf076c5fa69d32ad3c8ea759cd9d405b60f8663..8072d31525d9c7890804bb879893f1a69820e32d 100644 +--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java ++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +@@ -2349,7 +2349,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + 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); + } + } -- cgit v1.2.3