From df1a6e8bfa78d55e0b5e3123d0e6e6049bba713f Mon Sep 17 00:00:00 2001 From: inglettronald Date: Thu, 25 May 2023 19:07:52 -0500 Subject: fixed an issue where it's removing entities that it should not --- src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt index 0c7fcb9..d0976b9 100644 --- a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt +++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt @@ -41,6 +41,7 @@ object MemoryLeakFix { if (it !is EntityArmorStand) return@forEach if (it.name != "Armor Stand") return@forEach if (it.inventory.any{slot -> slot != null}) return@forEach + if (it.motionX != 0.toDouble() || it.motionY != 0.toDouble() || it.motionZ != 0.toDouble()) return@forEach world.removeEntityFromWorld(it.entityId) } } -- cgit