aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRime <81419447+Emirlol@users.noreply.github.com>2024-07-14 16:42:36 +0300
committerGitHub <noreply@github.com>2024-07-14 21:42:36 +0800
commitfd1122105b68dea4b4ef02d67fcc4a47c00db465 (patch)
tree6902e9cf49ad0cb7f6018bc4391630ffb9a5e39b /src/main
parent9244fb62fc445b10e44659a373c163ccb2a01dc7 (diff)
downloadSkyblocker-fd1122105b68dea4b4ef02d67fcc4a47c00db465.tar.gz
Skyblocker-fd1122105b68dea4b4ef02d67fcc4a47c00db465.tar.bz2
Skyblocker-fd1122105b68dea4b4ef02d67fcc4a47c00db465.zip
Add a case for when the dungeon hasn't started yet (#843)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java
index 309ba9ca..359e9ef2 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/DungeonSecretWidget.java
@@ -1,5 +1,6 @@
package de.hysky.skyblocker.skyblock.tabhud.widget;
+import de.hysky.skyblocker.skyblock.dungeon.DungeonScore;
import de.hysky.skyblocker.skyblock.tabhud.util.Ico;
import de.hysky.skyblocker.skyblock.tabhud.util.PlayerListMgr;
import net.minecraft.text.MutableText;
@@ -11,7 +12,6 @@ import java.util.regex.Pattern;
// this widget shows info about the secrets of the dungeon
public class DungeonSecretWidget extends Widget {
-
private static final MutableText TITLE = Text.literal("Discoveries").formatted(Formatting.DARK_PURPLE, Formatting.BOLD);
private static final Pattern DISCOVERIES = Pattern.compile("Discoveries: (\\d+)");
@@ -21,7 +21,10 @@ public class DungeonSecretWidget extends Widget {
@Override
public void updateContent() {
- if (PlayerListMgr.regexAt(31, DISCOVERIES) != null) {
+ if (!DungeonScore.isDungeonStarted()) {
+ this.addSimpleIcoText(Ico.CHEST, "Secrets:", Formatting.YELLOW, 30);
+ this.addSimpleIcoText(Ico.SKULL, "Crypts:", Formatting.YELLOW, 31);
+ } else if (PlayerListMgr.regexAt(31, DISCOVERIES) != null) {
this.addSimpleIcoText(Ico.CHEST, "Secrets:", Formatting.YELLOW, 32);
this.addSimpleIcoText(Ico.SKULL, "Crypts:", Formatting.YELLOW, 33);
} else {