diff --git a/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java b/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java index 635ace66198..2b5e152d4e7 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java @@ -49,7 +49,7 @@ public class EnigmaSouls { private static final Logger LOGGER = LoggerFactory.getLogger(EnigmaSouls.class); private static final Supplier TYPE_SUPPLIER = () -> SkyblockerConfigManager.get().uiAndVisuals.waypoints.waypointType; private static final Identifier WAYPOINTS_JSON = SkyblockerMod.id("rift/enigma_soul_waypoints.json"); - private static final Map SOUL_WAYPOINTS = new HashMap<>(42); + private static final Map SOUL_WAYPOINTS = new HashMap<>(50); private static final Path FOUND_SOULS_FILE = SkyblockerMod.CONFIG_DIR.resolve("found_enigma_souls.json"); private static final float[] GREEN = ColorUtils.getFloatComponents(DyeColor.GREEN); private static final float[] RED = ColorUtils.getFloatComponents(DyeColor.RED); @@ -131,7 +131,7 @@ static boolean onMessage(Component text, boolean overlay) { String message = text.getString(); if (message.equals("You have already found that Enigma Soul!") || ChatFormatting.stripFormatting(message).equals("SOUL! You unlocked an Enigma Soul!")) - markClosestSoulAsFound(); + markClosestSoul(true); } return true; @@ -151,11 +151,23 @@ static void registerCommands(CommandDispatcher dispat SOUL_WAYPOINTS.values().forEach(Waypoint::setMissing); context.getSource().sendFeedback(Constants.PREFIX.get().append(Component.translatable("skyblocker.rift.enigmaSouls.markAllMissing"))); + return Command.SINGLE_SUCCESS; + })) + .then(literal("markClosestFound").executes(context -> { + markClosestSoul(true); + context.getSource().sendFeedback(Constants.PREFIX.get().append(Component.translatable("skyblocker.rift.enigmaSouls.markClosestFound"))); + + return Command.SINGLE_SUCCESS; + })) + .then(literal("markClosestMissing").executes(context -> { + markClosestSoul(false); + context.getSource().sendFeedback(Constants.PREFIX.get().append(Component.translatable("skyblocker.rift.enigmaSouls.markClosestMissing"))); + return Command.SINGLE_SUCCESS; }))))); } - private static void markClosestSoulAsFound() { + private static void markClosestSoul(boolean asFound) { LocalPlayer player = Minecraft.getInstance().player; if (!soulsLoaded.isDone() || player == null) return; @@ -164,7 +176,7 @@ private static void markClosestSoulAsFound() { .filter(Waypoint::shouldRender) .min(Comparator.comparingDouble(soul -> soul.pos.distToCenterSqr(player.position()))) .filter(soul -> soul.pos.distToCenterSqr(player.position()) <= 16) - .ifPresent(Waypoint::setFound); + .ifPresent(asFound ? Waypoint::setFound : Waypoint::setMissing); } private static class EnigmaSoul extends ProfileAwareWaypoint { diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index f676c2b91a2..5c806a2fdf0 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -1818,6 +1818,8 @@ "skyblocker.rift.enigmaSouls.markAllFound": "Marked all enigma souls as found!", "skyblocker.rift.enigmaSouls.markAllMissing": "Marked all enigma souls as missing!", + "skyblocker.rift.enigmaSouls.markClosestFound": "Marked closest enigma soul as found!", + "skyblocker.rift.enigmaSouls.markClosestMissing": "Marked closest enigma soul as missing!", "skyblocker.rift.healNow": "Heal now!", "skyblocker.rift.iceNow": "Ice now!", "skyblocker.rift.mania": "Mania!", diff --git a/src/main/resources/assets/skyblocker/rift/enigma_soul_waypoints.json b/src/main/resources/assets/skyblocker/rift/enigma_soul_waypoints.json index 5c428fed57c..01b45ac8e06 100644 --- a/src/main/resources/assets/skyblocker/rift/enigma_soul_waypoints.json +++ b/src/main/resources/assets/skyblocker/rift/enigma_soul_waypoints.json @@ -210,6 +210,46 @@ "x": 256, "y": 130, "z": 75 + }, + { + "x": 7, + "y": 113, + "z": 73 + }, + { + "x": 35, + "y": 98, + "z": 166 + }, + { + "x": 22, + "y": 208, + "z": -5 + }, + { + "x": 21, + "y": 108, + "z": 55 + }, + { + "x": 39, + "y": 133, + "z": 16 + }, + { + "x": 8, + "y": 157, + "z": 59 + }, + { + "x": -20.5, + "y": 135, + "z": 38.5 + }, + { + "x": 26, + "y": 166, + "z": 7 } ] -} \ No newline at end of file +}