aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorWalker Selby <git@walkerselby.com>2022-03-27 14:21:41 -0500
committerGitHub <noreply@github.com>2022-03-27 21:21:41 +0200
commit4afcd516ffc58d55da24c5f4db14db7922f61121 (patch)
tree63dbabaa12f99106795a4045ad9e2e3ac97053ae /src/main/java
parentff6c85533f00b764cf27f1ad421b084bf3f288ad (diff)
downloadNotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.tar.gz
NotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.tar.bz2
NotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.zip
Blaze slayer (#102)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java2
3 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index ebb537dc..d40a39f1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
@@ -27,7 +27,7 @@ import static io.github.moulberry.notenoughupdates.overlays.SlayerOverlay.*;
public class ChatListener {
private final NotEnoughUpdates neu;
private static final Pattern SLAYER_XP = Pattern.compile(
- " (Spider|Zombie|Wolf|Enderman) Slayer LVL (\\d) - (?:Next LVL in ([\\d,]+) XP!|LVL MAXED OUT!)");
+ " (Spider|Zombie|Wolf|Enderman|Blaze) Slayer LVL (\\d) - (?:Next LVL in ([\\d,]+) XP!|LVL MAXED OUT!)");
AtomicBoolean missingRecipe = new AtomicBoolean(false);
public ChatListener(NotEnoughUpdates neu) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java
index 89fce0f2..e2b22b82 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/SlayerOverlay.java
@@ -66,6 +66,9 @@ public class SlayerOverlay extends TextOverlay {
case "Enderman":
if (!locrawLocation.equals("combat_3")) return false;
break;
+ case "Blaze":
+ if (!locrawLocation.equals("crimson_isle")) return false;
+ break;
default:
//A new slayer would need an update (see SBInfo)
return false;
@@ -97,10 +100,11 @@ public class SlayerOverlay extends TextOverlay {
slayerIntXP = 0;
isSlayerNine = false;
}
- //System.out.println(slayerEXP);
+
if (SBInfo.getInstance().slayer.equals("Tarantula") || SBInfo.getInstance().slayer.equals("Revenant")) {
useSmallXpNext = true;
- } else if (SBInfo.getInstance().slayer.equals("Sven") || SBInfo.getInstance().slayer.equals("Enderman")) {
+ } else if (SBInfo.getInstance().slayer.equals("Sven") || SBInfo.getInstance().slayer.equals("Enderman") ||
+ SBInfo.getInstance().slayer.equals("Blaze")) {
useSmallXpNext = false;
}
switch (slayerLVL) {
@@ -185,7 +189,7 @@ public class SlayerOverlay extends TextOverlay {
HashMap<Integer, String> lineMap = new HashMap<>();
NumberFormat format = NumberFormat.getIntegerInstance();
- //System.out.println(SBInfo.getInstance().isSlain);
+
overlayStrings = new ArrayList<>();
lineMap.put(
0,
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
index 5b7bd055..95a3539a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -311,6 +311,8 @@ public class SBInfo {
slayer = "Sven";
} else if (line.contains("Voidgloom Seraph")) {
slayer = "Enderman";
+ } else if (line.contains("Inferno Demonlord")) {
+ slayer = "Blaze";
}
if (lines.contains("Slayer Quest") && SlayerOverlay.unloadOverlayTimer == -1 ||
lines.contains("Slayer Quest") && System.currentTimeMillis() - SlayerOverlay.unloadOverlayTimer > 500) {