diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-06-28 05:15:12 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 21:15:12 +0200 |
commit | 8eab7d2432eb35acae7dc14c22428c9192f3fd61 (patch) | |
tree | 3ff76fde96cc4c5cbc2f467a83023c89503fd860 /src/main | |
parent | c2818f0e214e00f9e229fc18d487fa922c92defe (diff) | |
download | skyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.tar.gz skyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.tar.bz2 skyhanni-8eab7d2432eb35acae7dc14c22428c9192f3fd61.zip |
Merge pull request #257
* made text coloured and on by default
* small code cleanup
* registers on an unused hook
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt | 9 |
2 files changed, 8 insertions, 3 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 0058bc2a9..2a98f94fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/Inventory.java @@ -214,7 +214,7 @@ public class Inventory { "§bLarva Hook" } ) - public List<Integer> itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9, 11)); + public List<Integer> itemNumberAsStackSize = new ArrayList<>(Arrays.asList(3, 9, 11, 12)); @Expose @ConfigOption(name = "Sack Name", desc = "Show an abbreviation of the sack name.") 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 60680897b..2622c8f14 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemDisplayOverlayFeatures.kt @@ -164,8 +164,13 @@ 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") + "§7§7You may harvest §6(?<amount>.).*".toPattern().matchMatcher(line) { + val amount = group("amount").toInt() + return when { + amount > 4 -> "§a$amount" + amount > 2 -> "§e$amount" + else -> "§c$amount" + } } } } |