aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-02-17 22:50:19 +0800
committerBuildTools <james.jenour@protonmail.com>2021-02-17 22:50:19 +0800
commitde834a97505c66b5655ee7ff91e78e84da3f81f3 (patch)
tree93eb09a06d02501c060fb0401221d34a5bc24fd8 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java
parenta0e7d174472d034142003e58a42d6beefe36a92b (diff)
downloadnotenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.tar.gz
notenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.tar.bz2
notenoughupdates-de834a97505c66b5655ee7ff91e78e84da3f81f3.zip
PRE22
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java
index a60307d2..9a648221 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java
@@ -92,6 +92,7 @@ public class DwarvenMinesWaypoints {
private long dynamicMillis = 0;
private String dynamicLocation = null;
+ private String dynamicName = null;
private final Pattern ghastRegex = Pattern.compile("\u00A7r\u00A7eFind the \u00A7r\u00A76Powder Ghast\u00A7r\u00A7e near the \u00A7r\u00A7b(.+)!");
private final Pattern fallenStarRegex = Pattern.compile("\u00A7r\u00A75Fallen Star \u00A7r\u00A7ehas crashed at \u00A7r\u00A7b(.+)\u00A7r\u00A7e!");
@@ -100,11 +101,13 @@ public class DwarvenMinesWaypoints {
Matcher matcherGhast = ghastRegex.matcher(event.message.getFormattedText());
if(matcherGhast.find()) {
dynamicLocation = Utils.cleanColour(matcherGhast.group(1).trim());
+ dynamicName = EnumChatFormatting.GOLD+"Powder Ghast";
dynamicMillis = System.currentTimeMillis();
} else {
Matcher matcherStar = fallenStarRegex.matcher(event.message.getFormattedText());
if(matcherStar.find()) {
dynamicLocation = Utils.cleanColour(matcherStar.group(1).trim());
+ dynamicName = EnumChatFormatting.DARK_PURPLE+"Fallen Star";
dynamicMillis = System.currentTimeMillis();
}
}
@@ -185,12 +188,11 @@ public class DwarvenMinesWaypoints {
int locWaypoint = NotEnoughUpdates.INSTANCE.config.mining.locWaypoints;
- if(dynamicLocation != null &&
+ if(dynamicLocation != null && dynamicName != null &&
System.currentTimeMillis() - dynamicMillis < 30*1000) {
for(Map.Entry<String, Vector3f> entry : waypointsMap.entrySet()) {
if(entry.getKey().equals(dynamicLocation)) {
- renderWayPoint(EnumChatFormatting.GOLD+"Powder Ghast",
- new Vector3f(entry.getValue()).translate(0, 15, 0), event.partialTicks);
+ renderWayPoint(dynamicName, new Vector3f(entry.getValue()).translate(0, 15, 0), event.partialTicks);
break;
}
}