From 461681f94a9c155ff5258e96083ae981bd1c92bd Mon Sep 17 00:00:00 2001 From: Gegy Date: Wed, 20 Nov 2024 03:21:56 +0100 Subject: [PATCH] Allow untouchable entities to be unloaded --- src/main/java/com/lovetropics/extras/mixin/EntityMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/lovetropics/extras/mixin/EntityMixin.java b/src/main/java/com/lovetropics/extras/mixin/EntityMixin.java index 56f24c1..1ea61eb 100644 --- a/src/main/java/com/lovetropics/extras/mixin/EntityMixin.java +++ b/src/main/java/com/lovetropics/extras/mixin/EntityMixin.java @@ -49,7 +49,7 @@ public void moveTo(double x, double y, double z, float yRot, float xRot, Callbac @Inject(method = "setRemoved", at = @At("HEAD"), cancellable = true) public final void setRemoved(Entity.RemovalReason removalReason, CallbackInfo ci) { - if(this.tags.contains(lTExtras$UNTOUCHABLE)) { + if(removalReason == Entity.RemovalReason.KILLED && this.tags.contains(lTExtras$UNTOUCHABLE)) { ci.cancel(); } }