From 798109359163f6bc6c4a4e60183e5c0f34229e06 Mon Sep 17 00:00:00 2001 From: Sirttas Date: Tue, 9 Aug 2022 21:27:26 +0200 Subject: [PATCH] Fix `LivingEntity#isBlocking` to use `ToolActions#SHIELD_BLOCK` instead of `UseAnim#BLOCK` (#8933) --- .../net/minecraft/world/entity/LivingEntity.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch b/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch index d820dfa396..678020eb59 100644 --- a/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/LivingEntity.java.patch @@ -590,6 +590,15 @@ if (this.f_20935_.m_41781_()) { this.m_21329_(); } +@@ -2989,7 +_,7 @@ + public boolean m_21254_() { + if (this.m_6117_() && !this.f_20935_.m_41619_()) { + Item item = this.f_20935_.m_41720_(); +- if (item.m_6164_(this.f_20935_) != UseAnim.BLOCK) { ++ if (item.m_6164_(this.f_20935_) != UseAnim.BLOCK && !this.f_20935_.canPerformAction(net.minecraftforge.common.ToolActions.SHIELD_BLOCK)) { // TODO 1.20 only use the tool action + return false; + } else { + return item.m_8105_(this.f_20935_) - this.f_20936_ >= 5; @@ -3115,8 +_,8 @@ }