diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-22 19:14:46 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-06-22 19:14:46 +0200 |
commit | d4d16cbc7614452757e081e1498f0b9243f28318 (patch) | |
tree | 1d265ed0a62f779e833e4a029076d60939131d40 /src/main/java/at | |
parent | de3fe21430a47bab500d71bfbbd0e22ae69a4285 (diff) | |
download | skyhanni-d4d16cbc7614452757e081e1498f0b9243f28318.tar.gz skyhanni-d4d16cbc7614452757e081e1498f0b9243f28318.tar.bz2 skyhanni-d4d16cbc7614452757e081e1498f0b9243f28318.zip |
Added larva Hook uses display to item number feature
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java | 3 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 12 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java index d61db3cfd..0058bc2a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java @@ -210,7 +210,8 @@ public class Inventory { "§bKuudra Key", "§bSkill Level", "§bCollection Level", - "§bRancher's Boots speed" + "§bRancher's Boots speed", + "§bLarva Hook" } ) public List<Integer> itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9, 11)); 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 4ddfb0cf0..60680897b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -6,6 +6,7 @@ import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.ItemUtils.cleanName +import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.LorenzUtils.between @@ -159,6 +160,17 @@ class ItemDisplayOverlayFeatures { } } } + + if (SkyHanniMod.feature.inventory.itemNumberAsStackSize.contains(12)) { + if (item.getInternalName() == "LARVA_HOOK") { + for (line in item.getLore()) { + "§7§7You may harvest §6(?<amount>.)/.*".toPattern().matchMatcher(line) { + return group("amount") + } + } + } + } + return "" } |