diff options
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" + } } } } |