From eb68a59b4670d548fa4c0a493ad1d19029faeb5b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Mon, 22 May 2023 20:06:36 +0200 Subject: Use getItemInHand() --- .../java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/bingo') diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt index f49bcf1ed..8d26638f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardDisplay.kt @@ -7,6 +7,7 @@ import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.features.bingo.card.CommunityGoal import at.hannibal2.skyhanni.features.bingo.card.PersonalGoal +import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -123,8 +124,7 @@ class BingoCardDisplay { if (!LorenzUtils.isBingoProfile) return if (!config.enabled) return - val stack = Minecraft.getMinecraft().thePlayer.heldItem //TODO into ItemUtils or InventoryUtils - if (ItemUtils.isSkyBlockMenuItem(stack)) { + if (ItemUtils.isSkyBlockMenuItem(InventoryUtils.getItemInHand())) { val sneaking = Minecraft.getMinecraft().thePlayer.isSneaking if (lastSneak != sneaking) { lastSneak = sneaking -- cgit