From c745308c32276e82d7df430f4299bbfb091a4ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E8=91=89=20Scarlet?= <93977077+mukjepscarlet@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:14:48 +0800 Subject: [PATCH] AutoArmor equipFromInventory --- .../liquidbounce/features/module/modules/combat/AutoArmor.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/AutoArmor.kt b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/AutoArmor.kt index 23be24fd0a3..e8c2278f5a5 100644 --- a/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/AutoArmor.kt +++ b/src/main/java/net/ccbluex/liquidbounce/features/module/modules/combat/AutoArmor.kt @@ -173,7 +173,9 @@ object AutoArmor : Module("AutoArmor", Category.COMBAT, hideModule = false) { return } - val stacks = thePlayer.openContainer.inventory + val stacks = withContext(Dispatchers.Main) { + thePlayer.openContainer.inventorySlots.map { it.stack } + } val armorSet = getBestArmorSet(stacks) ?: continue