aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorILike2WatchMemes <ilike2watchmemes@gmail.com>2024-07-21 12:21:17 +0200
committerGitHub <noreply@github.com>2024-07-21 12:21:17 +0200
commit00831584bfa2e0e54e5f5bc65efbce10e06ee8e9 (patch)
tree4ff0654dac577151fe3e161744a4aab905d71290 /src/main/java
parent39f46e73324b2e8ee0d8971e60588afb143f1fdc (diff)
downloadskyhanni-00831584bfa2e0e54e5f5bc65efbce10e06ee8e9.tar.gz
skyhanni-00831584bfa2e0e54e5f5bc65efbce10e06ee8e9.tar.bz2
skyhanni-00831584bfa2e0e54e5f5bc65efbce10e06ee8e9.zip
Improvement: Added SkyBlock Level to Item Number (#2172)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
index 45c0a9e98..37201d64c 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java
@@ -142,6 +142,7 @@ public class InventoryConfig {
DARK_CACAO_TRUFFLE("§bDark Cacao Truffle"),
EDITION_NUMBER("§bEdition Number", 16),
BINGO_GOAL_RANK("§bBingo Goal Rank"),
+ SKYBLOCK_LEVEL("§bSkyblock Level")
;
private final String str;
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 324227248..ebd793cab 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt
@@ -21,6 +21,7 @@ import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumbe
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.PET_LEVEL
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.RANCHERS_BOOTS_SPEED
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKILL_LEVEL
+import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.SKYBLOCK_LEVEL
import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.VACUUM_GARDEN
import at.hannibal2.skyhanni.data.PetAPI
import at.hannibal2.skyhanni.events.RenderItemTipEvent
@@ -84,6 +85,15 @@ object ItemDisplayOverlayFeatures {
"(§.)*You were the (§.)*(?<rank>[\\w]+)(?<ordinal>(st|nd|rd|th)) (§.)*to"
)
+ /**
+ * REGEX-TEST: §7Your SkyBlock Level: §8[§a156§8]
+ * REGEX-TEST: §7Your SkyBlock Level: §8[§5399§8]
+ */
+ private val skyblockLevelPattern by patternGroup.pattern(
+ "skyblocklevel",
+ "§7Your SkyBlock Level: §8\\[(?<level>§.\\d+)§8]"
+ )
+
@SubscribeEvent
fun onRenderItemTip(event: RenderItemTipEvent) {
event.stackTip = getStackTip(event.stack) ?: return
@@ -267,6 +277,12 @@ object ItemDisplayOverlayFeatures {
}
}
+ if (SKYBLOCK_LEVEL.isSelected() && chestName == "SkyBlock Menu" && itemName == "SkyBlock Leveling") {
+ lore.matchFirst(skyblockLevelPattern) {
+ return group("level")
+ }
+ }
+
return null
}