diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2021-08-24 11:05:07 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2021-08-24 11:05:07 +0200 |
commit | 3328e7a98404b1968b6e1c76495b449969518414 (patch) | |
tree | 7ff3b2eeae9fbb81d0d322573ceb8ce2002ba451 /src/main | |
parent | 6d0e71699f4ec29c444aa867748ecb408756a01d (diff) | |
download | NotEnoughUpdates-3328e7a98404b1968b6e1c76495b449969518414.tar.gz NotEnoughUpdates-3328e7a98404b1968b6e1c76495b449969518414.tar.bz2 NotEnoughUpdates-3328e7a98404b1968b6e1c76495b449969518414.zip |
Update CrystalHollowOverlay.java
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java index 3dadca29..87d0d8fe 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java @@ -251,8 +251,8 @@ public class CrystalHollowOverlay extends TextOverlay { Matcher crystalPlacedMatcher = crystalPlacedPattern.matcher(message); Matcher crystalPlaceMatcher = crystalPlacePattern.matcher(message); Matcher crystalReclaimMatcher = crystalReclaimPattern.matcher(message); - if(message.equals(" You've earned a Crystal Loot Bundle!")) - hidden.crystals.replaceAll((k,v) -> 0); + if (message.equals(" You've earned a Crystal Loot Bundle!")) + hidden.crystals.replaceAll((k, v) -> 0); if (crystalNotPlacedMatcher.matches() && hidden.crystals.containsKey(crystalNotPlacedMatcher.group("crystal"))) { hidden.crystals.put(crystalNotPlacedMatcher.group("crystal"), 1); resetCrystal(hidden, crystalNotPlacedMatcher.group("crystal")); @@ -278,14 +278,13 @@ public class CrystalHollowOverlay extends TextOverlay { hidden.divanMinesParts.put(alreadyFoundMatcher.group("item"), true); } else if (message.startsWith(" ")) { Matcher crystalMatcher = obtainCrystalPattern.matcher(message); - if (crystalMatcher.matches()) - if (hidden.crystals.containsKey(crystalMatcher.group("crystal"))) - hidden.crystals.put(crystalMatcher.group("crystal"), 1); - else { - String item = message.replace(" ", ""); - if (hidden.divanMinesParts.containsKey(item)) - hidden.divanMinesParts.put(item, false); - } + if (crystalMatcher.matches() && hidden.crystals.containsKey(crystalMatcher.group("crystal"))) + hidden.crystals.put(crystalMatcher.group("crystal"), 1); + else { + String item = message.replace(" ", ""); + if (hidden.divanMinesParts.containsKey(item)) + hidden.divanMinesParts.put(item, false); + } } else if (message.startsWith("[NPC] Professor Robot: ")) { switch (message) { case "[NPC] Professor Robot: That's not one of the components I need! Bring me one of the missing components:": |