aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/Misc.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt13
2 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
index d55463419..73ef39593 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/Misc.java
@@ -431,14 +431,14 @@ public class Misc {
public static class PocketSackInASack {
@Expose
- @ConfigOption(name = "Pocket Sack-In-A-Sack", desc = "Show numbers of Pocket Sack-In-A-Sack applied on a sack.")
+ @ConfigOption(name = "Show in Overlay", desc = "Show numbers of Pocket Sack-In-A-Sack applied on a sack icon as overlay.")
@ConfigEditorBoolean
- public boolean showApplied = false;
+ public boolean showOverlay = false;
@Expose
@ConfigOption(name = "Replace In Lore", desc = "Replace how text is displayed in lore.\nShow §eis stitched with 2/3...\n§7Instead of §eis stitched with two...")
@ConfigEditorBoolean
- public boolean replaceLore = false;
+ public boolean replaceLore = true;
}
@Expose
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt
index 5d851eb56..721248658 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt
@@ -19,7 +19,7 @@ class PocketSackInASackDisplay {
fun onRenderItemOverlayPost(event: GuiRenderItemEvent.RenderOverlayEvent.GuiRenderItemPost) {
val stack = event.stack ?: return
if (!LorenzUtils.inSkyBlock || stack.stackSize != 1) return
- if (!config.showApplied) return
+ if (!config.showOverlay) return
val pocketSackInASackApplied = stack.getAppliedPocketSackInASack() ?: return
val stackTip = "§a$pocketSackInASackApplied"
@@ -46,19 +46,20 @@ class PocketSackInASackDisplay {
}
@SubscribeEvent
- fun onTooltip(event: LorenzToolTipEvent){
+ fun onTooltip(event: LorenzToolTipEvent) {
+ if (!LorenzUtils.inSkyBlock) return
if (!config.replaceLore) return
if (!ItemUtils.isSack(event.itemStack.displayName)) return
val it = event.toolTip.listIterator()
- for (line in it){
- valPattern.matchMatcher(line){
- val replace = when (group("number")){
+ for (line in it) {
+ valPattern.matchMatcher(line) {
+ val replace = when (group("number")) {
"a" -> "§c1"
"two" -> "§62"
"three" -> "§a3"
else -> "0"
}
- it.set(line.replace(Regex("\\b${group("number")}\\b"), "$replace§7/§b3"))
+ it.set(line.replace(Regex("\\b${group("number")}\\b"), "$replace§7/§b3"))
}
}
}