diff options
author | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 19:11:58 +0200 |
---|---|---|
committer | Lorenz <ESs95s3P5z8Pheb> | 2022-07-14 19:11:58 +0200 |
commit | 0fa564604a99400e91385dec37753345174c45e0 (patch) | |
tree | ac585217b9bed066f6d152598eb91926e9cdf562 /src/main/java/at/hannibal2 | |
parent | 73f86c4bb3284b71e47a1f6a5b56426de8693140 (diff) | |
download | skyhanni-0fa564604a99400e91385dec37753345174c45e0.tar.gz skyhanni-0fa564604a99400e91385dec37753345174c45e0.tar.bz2 skyhanni-0fa564604a99400e91385dec37753345174c45e0.zip |
add support for new soulbound items and fishing baits and new crimson essence items
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt | 21 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 2 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt index dd533b3d2..421a73140 100644 --- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt @@ -171,7 +171,10 @@ class HideNotClickableItems { return true } - if (stack.cleanName().endsWith(" Bait")) return false + if (stack.getLore().any { it.removeColorCodes() == "Fishing Bait" }) { + return false + } +// if (stack.cleanName().endsWith(" Bait")) return false hideReason = "This item is not a fishing bait!" return true @@ -201,8 +204,8 @@ class HideNotClickableItems { private fun hideTrade(chestName: String, stack: ItemStack): Boolean { if (!chestName.startsWith("You ")) return false - if (ItemUtils.isCoOpSoulBound(stack)) { - hideReason = "Coop-Soulbound items cannot be traded!" + if (ItemUtils.isSoulBound(stack)) { + hideReason = "Soulbound items cannot be traded!" return true } @@ -262,6 +265,7 @@ class HideNotClickableItems { "Lever" -> return false "Fairy's Galoshes" -> return false + "Blaze Powder" -> return false } if (name.endsWith("Gem Rune I")) return false @@ -347,8 +351,13 @@ class HideNotClickableItems { items.add("Zombie Commander Whip") items.add("Sniper Bow") + //Crimson essence + items.add("Blade of the Volcano") + items.add("Slug Boots") + items.add("Flaming Chestplate") + for (item in items) { - if (name.endsWith(" $item")) { + if (name.endsWith(item)) { return false } } @@ -391,8 +400,8 @@ class HideNotClickableItems { } private fun isNotAuctionable(stack: ItemStack): Boolean { - if (ItemUtils.isCoOpSoulBound(stack)) { - hideReason = "Coop-Soulbound items cannot be auctioned!" + if (ItemUtils.isSoulBound(stack)) { + hideReason = "Soulbound items cannot be auctioned!" return true } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt index b077c4121..243cbc1dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt @@ -31,7 +31,7 @@ object ItemUtils { fun ItemStack.getLore() = ItemUtil.getItemLore(this) - fun isCoOpSoulBound(stack: ItemStack): Boolean = stack.getLore().any { it.contains("Co-op Soulbound") } + fun isSoulBound(stack: ItemStack): Boolean = stack.getLore().any { it.contains(" Soulbound ") } fun isRecombobulated(stack: ItemStack): Boolean = stack.getLore().any { it.contains("§k") } |