diff options
author | inglettronald <inglettronald@gmail.com> | 2023-05-25 17:56:26 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-05-25 17:56:26 -0500 |
commit | b564715bf288a0ccfd25fa24cfe5d9ff755ab2c3 (patch) | |
tree | 6226569e43e5cffa7b800b7fab74e80d044a45d1 /src/main/kotlin/dulkirmod | |
parent | 690b0d2d0f0e58d1a23a72e2b30cca3af748348e (diff) | |
download | DulkirMod-b564715bf288a0ccfd25fa24cfe5d9ff755ab2c3.tar.gz DulkirMod-b564715bf288a0ccfd25fa24cfe5d9ff755ab2c3.tar.bz2 DulkirMod-b564715bf288a0ccfd25fa24cfe5d9ff755ab2c3.zip |
added option to make your game worse
Diffstat (limited to 'src/main/kotlin/dulkirmod')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt index 0bf768f..0c7fcb9 100644 --- a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt +++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt @@ -34,12 +34,13 @@ object MemoryLeakFix { } fun clearBlankStands() { + if (!DulkirConfig.blankStandRemoval) return val world = mc.theWorld ?: return val currentEnts = world.loadedEntityList currentEnts.forEach { - if (it !is EntityArmorStand) return - if (it.name != "Armor Stand") return - if (it.inventory.any{slot -> slot != null}) return + if (it !is EntityArmorStand) return@forEach + if (it.name != "Armor Stand") return@forEach + if (it.inventory.any{slot -> slot != null}) return@forEach world.removeEntityFromWorld(it.entityId) } } |