From b564715bf288a0ccfd25fa24cfe5d9ff755ab2c3 Mon Sep 17 00:00:00 2001 From: inglettronald Date: Thu, 25 May 2023 17:56:26 -0500 Subject: added option to make your game worse --- src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt | 7 ++++--- 1 file 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) } } -- cgit