diff options
author | inglettronald <inglettronald@gmail.com> | 2023-05-25 19:07:52 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-05-25 19:07:52 -0500 |
commit | df1a6e8bfa78d55e0b5e3123d0e6e6049bba713f (patch) | |
tree | 587d650b9f97689d9273ce1691bc3b93cc18796d /src/main/kotlin/dulkirmod | |
parent | 4198f647a35a6de7bc12242cbc8cf37d20e66cba (diff) | |
download | DulkirMod-df1a6e8bfa78d55e0b5e3123d0e6e6049bba713f.tar.gz DulkirMod-df1a6e8bfa78d55e0b5e3123d0e6e6049bba713f.tar.bz2 DulkirMod-df1a6e8bfa78d55e0b5e3123d0e6e6049bba713f.zip |
fixed an issue where it's removing entities that it should not
Diffstat (limited to 'src/main/kotlin/dulkirmod')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt | 1 |
1 files changed, 1 insertions, 0 deletions
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) } } |