diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-16 12:23:50 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-16 12:23:50 +0100 |
commit | fb224f34544a87b4cb3af7ef242ac9daf74369f0 (patch) | |
tree | e5bb0e499328726378d1bd45308865a813b4ec29 | |
parent | f35378de786004fe0972e989620ae89f1258feef (diff) | |
download | skyhanni-fb224f34544a87b4cb3af7ef242ac9daf74369f0.tar.gz skyhanni-fb224f34544a87b4cb3af7ef242ac9daf74369f0.tar.bz2 skyhanni-fb224f34544a87b4cb3af7ef242ac9daf74369f0.zip |
Using new armor helper functions
3 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt index 5ebc4e8d4..3fc3dbcf7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -25,7 +25,6 @@ import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.features.garden.pests.PestAPI import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.InventoryUtils -import at.hannibal2.skyhanni.utils.InventoryUtils.getHelmet import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.cleanName import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -167,7 +166,9 @@ object ItemDisplayOverlayFeatures { if (RANCHERS_BOOTS_SPEED.isSelected() && itemName.contains("Rancher's Boots")) { item.getRanchersSpeed()?.let { - return if (it > 400 && (PetAPI.currentPet?.contains("Black Cat") == true || getHelmet()?.getInternalName() == "RACING_HELMET".asInternalName())) { + return if (it > 400 && (PetAPI.currentPet?.contains("Black Cat") == true || + InventoryUtils.getHelmet()?.getInternalName() == "RACING_HELMET".asInternalName()) + ) { "§c$it" } else { "§a$it" diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt index 639784234..639693afb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt @@ -23,7 +23,7 @@ class ChickenHeadTimer { if (!isEnabled()) return if (!event.isMod(5)) return - val itemStack = InventoryUtils.getArmor()[3] + val itemStack = InventoryUtils.getHelmet() val name = itemStack?.name ?: "" hasChickenHead = name.contains("Chicken Head") } @@ -72,4 +72,4 @@ class ChickenHeadTimer { } fun isEnabled() = LorenzUtils.inSkyBlock && config.displayTimer -}
\ No newline at end of file +} diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt index 57eb0ead2..41c52b3f5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/KloonHacking.kt @@ -44,7 +44,7 @@ class KloonHacking { } private fun checkHelmet() { - wearingHelmet = InventoryUtils.getArmor()[3]?.getInternalName()?.equals("RETRO_ENCABULATING_VISOR") ?: false + wearingHelmet = InventoryUtils.getHelmet()?.getInternalName()?.equals("RETRO_ENCABULATING_VISOR") ?: false } @SubscribeEvent |