From b808a6aea1ba28ffd10712e7586b6f0d6cc1804a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:04:56 +0100 Subject: Internal Change: Code cleanup ContainerChest getAllItems (#1047) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo') diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt index 430f139c2..f222040df 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt @@ -8,6 +8,7 @@ import at.hannibal2.skyhanni.features.bingo.BingoAPI.getData import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.InventoryUtils +import at.hannibal2.skyhanni.utils.InventoryUtils.getAllItems import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.highlight @@ -83,9 +84,7 @@ class BingoCardTips { val guiChest = event.gui val chest = guiChest.inventorySlots as ContainerChest - for (slot in chest.inventorySlots) { - if (slot == null) continue - + for ((slot, _) in chest.getAllItems()) { val goal = BingoAPI.bingoGoals[slot.slotNumber] ?: continue if (config.hideDoneDifficulty && goal.done) continue -- cgit