diff options
author | Walker Selby <git@walkerselby.com> | 2022-03-27 14:21:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-27 21:21:41 +0200 |
commit | 4afcd516ffc58d55da24c5f4db14db7922f61121 (patch) | |
tree | 63dbabaa12f99106795a4045ad9e2e3ac97053ae | |
parent | ff6c85533f00b764cf27f1ad421b084bf3f288ad (diff) | |
download | NotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.tar.gz NotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.tar.bz2 NotEnoughUpdates-4afcd516ffc58d55da24c5f4db14db7922f61121.zip |
Blaze slayer (#102)
4 files changed, 11 insertions, 4 deletions
diff --git a/Update Notes/2.1.md b/Update Notes/2.1.md index 9b67fb75..98672187 100644 --- a/Update Notes/2.1.md +++ b/Update Notes/2.1.md @@ -68,6 +68,7 @@ - Added NBT data to Profile Viewer HOTM tree icons - whalker - Added NBT data to Profile Viewer Tab Icons - whalker - Added NBT data to Profile Viewer XP Bar Icons - whalker +- Added Blaze Slayer information - whalker ### **Bug Fixes:** - Fix wiki pages freezing the entire game - nea89 - Made titanium overlay and waypoints work with dwarven overlay off 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) { |