aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt7
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt9
3 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
index 05e61b1e3..de49befd8 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbility.kt
@@ -38,6 +38,7 @@ enum class ItemAbility(
WITHER_CLOAK(10),
HOLY_ICE(4),
VOODOO_DOLL_WILTED(3),
+ SHADOW_FURY(15, "STARRED_SHADOW_FURY"),
// doesn't have a sound
ENDER_BOW("Ender Warp", 30, "Ender Bow"),
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
index 114d15673..b86aec0c6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzColor
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.between
+import at.hannibal2.skyhanni.utils.LorenzUtils.equalsOneOf
import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getAbilityScrolls
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import net.minecraft.client.Minecraft
@@ -42,6 +43,12 @@ class ItemAbilityCooldown {
if (event.pitch == 0.61904764f && event.volume == 1f) {
ItemAbility.GYROKINETIC_WAND_LEFT.sound()
}
+ if (event.pitch == 1f && event.volume == 1f) {
+ val internalName = InventoryUtils.getItemInHand()?.getInternalName() ?: return
+ if (!internalName.equalsOneOf("SHADOW_FURY", "STARRED_SHADOW_FURY")) return
+
+ ItemAbility.SHADOW_FURY.sound()
+ }
}
if (event.soundName == "random.anvil_land") {
if (event.pitch == 0.4920635f && event.volume == 1f) {
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
index 183cd78d7..f84d135ef 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/LorenzUtils.kt
@@ -413,4 +413,13 @@ object LorenzUtils {
}
fun Field.makeAccessible() = also { isAccessible = true }
+
+ // Taken and modified from Skytils
+ @JvmStatic
+ fun Any.equalsOneOf(vararg other: Any): Boolean {
+ for (obj in other) {
+ if (this == obj) return true
+ }
+ return false
+ }
} \ No newline at end of file