From 35a12b039e30c6861e518baf8d603f78b15e9888 Mon Sep 17 00:00:00 2001 From: Nico Mexis Date: Sat, 26 Oct 2024 22:36:23 +0200 Subject: [PATCH] Fix crash --- .../src/main/java/dev/architectury/mixin/fabric/MixinEntity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinEntity.java b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinEntity.java index 09bbb0f1..48d6a95a 100644 --- a/fabric/src/main/java/dev/architectury/mixin/fabric/MixinEntity.java +++ b/fabric/src/main/java/dev/architectury/mixin/fabric/MixinEntity.java @@ -36,6 +36,7 @@ public class MixinEntity { @Inject(method = "hurtClient", at = @At("HEAD"), cancellable = true) private void hurtClient(DamageSource damageSource, CallbackInfoReturnable cir) { + if (!((Object) this instanceof LivingEntity)) return; if ((Object) this instanceof Player) return; if (EntityEvent.LIVING_HURT.invoker().hurt((LivingEntity) (Object) this, damageSource, 0).isFalse()) { cir.setReturnValue(false);