From bba69288cb1224cd203bfb113a6c9f11bf6499e8 Mon Sep 17 00:00:00 2001 From: CalMWolfs Date: Fri, 23 Jun 2023 21:59:10 +1000 Subject: add enigma soul waypoints --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 1 + .../skyhanni/features/rift/EnigmaSoulWaypoints.kt | 125 +++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 92b2e9f08..2ba491953 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -309,6 +309,7 @@ class SkyHanniMod { loadModule(RiftLarva()) loadModule(RiftOdonata()) loadModule(RiftAgaricusCap()) + loadModule(EnigmaSoulWaypoints()) init() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt new file mode 100644 index 000000000..7f5c901a6 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt @@ -0,0 +1,125 @@ +package at.hannibal2.skyhanni.features.rift + +import at.hannibal2.skyhanni.events.* +import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled +import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer +import at.hannibal2.skyhanni.utils.LorenzColor +import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText +import at.hannibal2.skyhanni.utils.RenderUtils.highlight +import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import io.github.moulberry.notenoughupdates.events.SlotClickEvent +import net.minecraft.client.gui.inventory.GuiChest +import net.minecraft.inventory.ContainerChest +import net.minecraftforge.client.event.RenderWorldLastEvent +import net.minecraftforge.fml.common.eventhandler.EventPriority +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent + +class EnigmaSoulWaypoints { + private var inInventory = false + private val soulLocations = mutableMapOf() + private val trackedSouls = mutableListOf() + + @SubscribeEvent + fun onInventoryOpen(event: InventoryOpenEvent) { + inInventory = false + if (event.inventoryName.contains("Enigma Souls")) inInventory = true + } + + @SubscribeEvent + fun onInventoryClose(event: InventoryCloseEvent) { + inInventory = false + } + + @SubscribeEvent(priority = EventPriority.HIGH) + fun onSlotClick(event: SlotClickEvent) { + if (!inInventory || !RiftAPI.inRift()) return + + val split = event.slot.stack.displayName.split("Enigma: ") + if (split.size == 2) { + event.isCanceled = true // maybe change to a middle click + if (soulLocations.contains(split.last())) { + if (!trackedSouls.contains(split.last())) { + LorenzUtils.chat("§5Tracking the ${split.last()} Enigma Soul!") + trackedSouls.add(split.last()) + } else { + trackedSouls.remove(split.last()) + LorenzUtils.chat("§5No longer tracking the ${split.last()} Enigma Soul!") + } + } + } + } + + @SubscribeEvent(priority = EventPriority.LOWEST) + fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { + if (!RiftAPI.inRift() || !inInventory) return + + if (event.gui !is GuiChest) return + val guiChest = event.gui + val chest = guiChest.inventorySlots as ContainerChest + + for (slot in chest.inventorySlots) { + if (slot == null) continue + val stack = slot.stack ?: continue + + for (soul in trackedSouls) { + if (stack.displayName.removeColor().contains(soul)) { + slot highlight LorenzColor.DARK_PURPLE + } + } + } + } + + @SubscribeEvent + fun onRenderWorld(event: RenderWorldLastEvent) { + if (!RiftAPI.inRift()) return + for (soul in trackedSouls) { + soulLocations[soul]?.let { event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), true, true) } + soulLocations[soul]?.let { event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.0) } + } + } + + @SubscribeEvent + fun onRepoReload(event: RepositoryReloadEvent) { + val data = event.getConstant("EnigmaSouls") ?: return + + for (area in data.entrySet()) { + val element = area.value.asJsonArray + + for (i in 0 until element.size()) { + val itemObject = element[i].asJsonObject + val name = itemObject["name"].asString + val position = itemObject["position"].asString + val split = position.split(", ") + if (split.size == 3) { + soulLocations[name] = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) + } + } + } + } + + @SubscribeEvent + fun onChat(event: LorenzChatEvent) { + if (!RiftAPI.inRift()) return + val message = event.message.removeColor().trim() + // not sure how this works for buying the souls + if (message == "You have already found that Enigma Soul!" || message == "SOUL! You unlocked an Enigma Soul!") { + hideClosestSoul() + } + } + + private fun hideClosestSoul() { + var closestSoul = "" + var closestDistance = 8.0 + + for (soul in soulLocations) { + if (soul.value.distanceToPlayer() < closestDistance) { + closestSoul = soul.key + closestDistance = soul.value.distanceToPlayer() + } + } + trackedSouls.remove(closestSoul) + LorenzUtils.chat("§5Found the $closestSoul Enigma Soul!") + } +} \ No newline at end of file -- cgit From 092eac9752c79d34c9a7a9bf20c5491b1936f16e Mon Sep 17 00:00:00 2001 From: CalMWolfs Date: Sat, 24 Jun 2023 00:16:11 +1000 Subject: kinda more done --- src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt | 2 +- .../skyhanni/features/rift/EnigmaSoulWaypoints.kt | 66 +++++++++++++++++++--- .../hannibal2/skyhanni/features/rift/RiftRegion.kt | 13 +++++ 3 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 2ba491953..9739e4aa5 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -309,7 +309,7 @@ class SkyHanniMod { loadModule(RiftLarva()) loadModule(RiftOdonata()) loadModule(RiftAgaricusCap()) - loadModule(EnigmaSoulWaypoints()) + loadModule(EnigmaSoulWaypoints) init() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt index 7f5c901a6..5abbc22ee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt @@ -2,40 +2,85 @@ package at.hannibal2.skyhanni.features.rift import at.hannibal2.skyhanni.events.* import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled +import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzVec +import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent import io.github.moulberry.notenoughupdates.events.SlotClickEvent +import io.github.moulberry.notenoughupdates.util.Utils import net.minecraft.client.gui.inventory.GuiChest +import net.minecraft.client.player.inventory.ContainerLocalMenu +import net.minecraft.init.Blocks import net.minecraft.inventory.ContainerChest +import net.minecraft.item.ItemStack import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent -class EnigmaSoulWaypoints { +object EnigmaSoulWaypoints { private var inInventory = false - private val soulLocations = mutableMapOf() + private val soulLocations = mutableMapOf>() private val trackedSouls = mutableListOf() + private val inventoryUnfound = mutableListOf() + private var adding = true + + private val item by lazy { + val neuItem = NEUItems.getItemStackOrNull("SKYBLOCK_ENIGMA_SOUL") ?: ItemStack(Blocks.obsidian) // can prob have a better fallback + Utils.createItemStack(neuItem.item, "§5Toggle Missing", "§7Click here to toggle", "§7the waypoints for each", "§7missing souls on this page") + } + + @SubscribeEvent + fun replaceItem(event: ReplaceItemEvent) { + if (inventoryUnfound.isEmpty()) return + if (event.inventory is ContainerLocalMenu && inInventory && event.slotNumber == 31) { + event.replaceWith(item) + } + } @SubscribeEvent fun onInventoryOpen(event: InventoryOpenEvent) { inInventory = false - if (event.inventoryName.contains("Enigma Souls")) inInventory = true + if (!event.inventoryName.contains("Enigma Souls")) return + inInventory = true + + for (stack in event.inventoryItems.values) { + val split = stack.displayName.split("Enigma: ") + if (split.size == 2) { + if (stack.getLore().last() == "§8✖ Not completed yet!") { + inventoryUnfound.add(split.last()) + } + } + } } @SubscribeEvent fun onInventoryClose(event: InventoryCloseEvent) { inInventory = false + inventoryUnfound.clear() + adding = true } @SubscribeEvent(priority = EventPriority.HIGH) fun onSlotClick(event: SlotClickEvent) { if (!inInventory || !RiftAPI.inRift()) return + if (event.slotId == 31 && inventoryUnfound.isNotEmpty()) { + event.isCanceled = true + if (adding) { + trackedSouls.addAll(inventoryUnfound) + adding = false + } else { + trackedSouls.removeAll(inventoryUnfound) + adding = true + } + } + val split = event.slot.stack.displayName.split("Enigma: ") if (split.size == 2) { event.isCanceled = true // maybe change to a middle click @@ -69,14 +114,17 @@ class EnigmaSoulWaypoints { } } } + if (!adding) { + chest.inventorySlots[31] highlight LorenzColor.DARK_PURPLE + } } @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { if (!RiftAPI.inRift()) return for (soul in trackedSouls) { - soulLocations[soul]?.let { event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), true, true) } - soulLocations[soul]?.let { event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.0) } + soulLocations[soul]?.let { event.drawWaypointFilled(it.first, LorenzColor.DARK_PURPLE.toColor(), true, true) } + soulLocations[soul]?.let { event.drawDynamicText(it.first.add(0, 1, 0), "§5$soul Soul", 1.0) } } } @@ -85,6 +133,7 @@ class EnigmaSoulWaypoints { val data = event.getConstant("EnigmaSouls") ?: return for (area in data.entrySet()) { + val region = RiftRegion.values().firstOrNull {it.areaName == area.key.toString()} ?: continue val element = area.value.asJsonArray for (i in 0 until element.size()) { @@ -93,7 +142,8 @@ class EnigmaSoulWaypoints { val position = itemObject["position"].asString val split = position.split(", ") if (split.size == 3) { - soulLocations[name] = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) + val location = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) + soulLocations[name] = Pair(location, region) } } } @@ -114,9 +164,9 @@ class EnigmaSoulWaypoints { var closestDistance = 8.0 for (soul in soulLocations) { - if (soul.value.distanceToPlayer() < closestDistance) { + if (soul.value.first.distanceToPlayer() < closestDistance) { closestSoul = soul.key - closestDistance = soul.value.distanceToPlayer() + closestDistance = soul.value.first.distanceToPlayer() } } trackedSouls.remove(closestSoul) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt new file mode 100644 index 000000000..c18c05532 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt @@ -0,0 +1,13 @@ +package at.hannibal2.skyhanni.features.rift + +enum class RiftRegion(val areaName: String, vararg val aliases: String) { + WYLD_WOODS("Wyld Woods", "wyld", "woods"), + BLACK_LAGOON("Black Lagoon", "lagoon", "black"), + WEST_VILLAGE("West Village", "west"), + DREADFARM("Dreadfarm", "dreadfarm"), + VILLAGE_PLAZA("Village Plaza", "plaza", "villagePlaza"), + LIVING_CAVE("Living Cave", "living", "cave"), + COLOSSEUM("Colosseum", "collosseum"), + STILLGORE_CHATEAU("Stillgore Château", "stillgore", "chateau"), + MOUNTAINTOP("Mountaintop") +} \ No newline at end of file -- cgit From 56a1aa791f44fa8e3f80d2e511a5b0bb61e09dc3 Mon Sep 17 00:00:00 2001 From: CalMWolfs Date: Sat, 24 Jun 2023 09:15:23 +1000 Subject: removing other thing, using middle click --- .../skyhanni/features/rift/EnigmaSoulWaypoints.kt | 29 +++++++++++++--------- .../hannibal2/skyhanni/features/rift/RiftRegion.kt | 13 ---------- 2 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt index 5abbc22ee..0571b8851 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt @@ -25,14 +25,21 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object EnigmaSoulWaypoints { private var inInventory = false - private val soulLocations = mutableMapOf>() + private val soulLocations = mutableMapOf() private val trackedSouls = mutableListOf() private val inventoryUnfound = mutableListOf() private var adding = true private val item by lazy { - val neuItem = NEUItems.getItemStackOrNull("SKYBLOCK_ENIGMA_SOUL") ?: ItemStack(Blocks.obsidian) // can prob have a better fallback - Utils.createItemStack(neuItem.item, "§5Toggle Missing", "§7Click here to toggle", "§7the waypoints for each", "§7missing souls on this page") + val neuItem = NEUItems.getItemStackOrNull("SKYBLOCK_ENIGMA_SOUL") + ?: ItemStack(Blocks.obsidian) // can prob have a better fallback + Utils.createItemStack( + neuItem.item, + "§5Toggle Missing", + "§7Click here to toggle", + "§7the waypoints for each", + "§7missing souls on this page" + ) } @SubscribeEvent @@ -71,7 +78,7 @@ object EnigmaSoulWaypoints { if (!inInventory || !RiftAPI.inRift()) return if (event.slotId == 31 && inventoryUnfound.isNotEmpty()) { - event.isCanceled = true + event.usePickblockInstead() if (adding) { trackedSouls.addAll(inventoryUnfound) adding = false @@ -83,7 +90,7 @@ object EnigmaSoulWaypoints { val split = event.slot.stack.displayName.split("Enigma: ") if (split.size == 2) { - event.isCanceled = true // maybe change to a middle click + event.usePickblockInstead() if (soulLocations.contains(split.last())) { if (!trackedSouls.contains(split.last())) { LorenzUtils.chat("§5Tracking the ${split.last()} Enigma Soul!") @@ -123,8 +130,8 @@ object EnigmaSoulWaypoints { fun onRenderWorld(event: RenderWorldLastEvent) { if (!RiftAPI.inRift()) return for (soul in trackedSouls) { - soulLocations[soul]?.let { event.drawWaypointFilled(it.first, LorenzColor.DARK_PURPLE.toColor(), true, true) } - soulLocations[soul]?.let { event.drawDynamicText(it.first.add(0, 1, 0), "§5$soul Soul", 1.0) } + soulLocations[soul]?.let { event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), true, true) } + soulLocations[soul]?.let { event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.0) } } } @@ -133,7 +140,6 @@ object EnigmaSoulWaypoints { val data = event.getConstant("EnigmaSouls") ?: return for (area in data.entrySet()) { - val region = RiftRegion.values().firstOrNull {it.areaName == area.key.toString()} ?: continue val element = area.value.asJsonArray for (i in 0 until element.size()) { @@ -142,8 +148,7 @@ object EnigmaSoulWaypoints { val position = itemObject["position"].asString val split = position.split(", ") if (split.size == 3) { - val location = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) - soulLocations[name] = Pair(location, region) + soulLocations[name] = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) } } } @@ -164,9 +169,9 @@ object EnigmaSoulWaypoints { var closestDistance = 8.0 for (soul in soulLocations) { - if (soul.value.first.distanceToPlayer() < closestDistance) { + if (soul.value.distanceToPlayer() < closestDistance) { closestSoul = soul.key - closestDistance = soul.value.first.distanceToPlayer() + closestDistance = soul.value.distanceToPlayer() } } trackedSouls.remove(closestSoul) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt deleted file mode 100644 index c18c05532..000000000 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/RiftRegion.kt +++ /dev/null @@ -1,13 +0,0 @@ -package at.hannibal2.skyhanni.features.rift - -enum class RiftRegion(val areaName: String, vararg val aliases: String) { - WYLD_WOODS("Wyld Woods", "wyld", "woods"), - BLACK_LAGOON("Black Lagoon", "lagoon", "black"), - WEST_VILLAGE("West Village", "west"), - DREADFARM("Dreadfarm", "dreadfarm"), - VILLAGE_PLAZA("Village Plaza", "plaza", "villagePlaza"), - LIVING_CAVE("Living Cave", "living", "cave"), - COLOSSEUM("Colosseum", "collosseum"), - STILLGORE_CHATEAU("Stillgore Château", "stillgore", "chateau"), - MOUNTAINTOP("Mountaintop") -} \ No newline at end of file -- cgit From 22dc47339138945b60b1c417f6429d17cb2faea2 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 25 Jun 2023 14:00:06 +0200 Subject: used java pojo object for EnigmaSouls --- .../skyhanni/features/rift/EnigmaSoulWaypoints.kt | 41 ++++++++++------------ .../utils/jsonobjects/EnigmaSoulsJson.java | 19 ++++++++++ 2 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/EnigmaSoulsJson.java (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt index 0571b8851..08cfa0753 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt @@ -11,6 +11,7 @@ import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.RenderUtils.highlight import at.hannibal2.skyhanni.utils.StringUtils.removeColor +import at.hannibal2.skyhanni.utils.jsonobjects.EnigmaSoulsJson import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent import io.github.moulberry.notenoughupdates.events.SlotClickEvent import io.github.moulberry.notenoughupdates.util.Utils @@ -130,26 +131,21 @@ object EnigmaSoulWaypoints { fun onRenderWorld(event: RenderWorldLastEvent) { if (!RiftAPI.inRift()) return for (soul in trackedSouls) { - soulLocations[soul]?.let { event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), true, true) } - soulLocations[soul]?.let { event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.0) } + soulLocations[soul]?.let { + event.drawWaypointFilled(it, LorenzColor.DARK_PURPLE.toColor(), seeThroughBlocks = true, beacon = true) + event.drawDynamicText(it.add(0, 1, 0), "§5$soul Soul", 1.5) + } } } @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { - val data = event.getConstant("EnigmaSouls") ?: return - - for (area in data.entrySet()) { - val element = area.value.asJsonArray - - for (i in 0 until element.size()) { - val itemObject = element[i].asJsonObject - val name = itemObject["name"].asString - val position = itemObject["position"].asString - val split = position.split(", ") - if (split.size == 3) { - soulLocations[name] = LorenzVec(split[0].toDouble(), split[1].toDouble(), split[2].toDouble()) - } + val data = event.getConstant("EnigmaSouls") ?: return + val areas = data.areas ?: error("'areas' is null in EnigmaSouls!") + soulLocations.clear() + for ((area, locations) in areas) { + for (location in locations) { + soulLocations[location.name] = location.position } } } @@ -158,7 +154,6 @@ object EnigmaSoulWaypoints { fun onChat(event: LorenzChatEvent) { if (!RiftAPI.inRift()) return val message = event.message.removeColor().trim() - // not sure how this works for buying the souls if (message == "You have already found that Enigma Soul!" || message == "SOUL! You unlocked an Enigma Soul!") { hideClosestSoul() } @@ -168,13 +163,15 @@ object EnigmaSoulWaypoints { var closestSoul = "" var closestDistance = 8.0 - for (soul in soulLocations) { - if (soul.value.distanceToPlayer() < closestDistance) { - closestSoul = soul.key - closestDistance = soul.value.distanceToPlayer() + for ((soul, location) in soulLocations) { + if (location.distanceToPlayer() < closestDistance) { + closestSoul = soul + closestDistance = location.distanceToPlayer() } } - trackedSouls.remove(closestSoul) - LorenzUtils.chat("§5Found the $closestSoul Enigma Soul!") + if (closestSoul in trackedSouls) { + trackedSouls.remove(closestSoul) + LorenzUtils.chat("§5Found the $closestSoul Enigma Soul!") + } } } \ No newline at end of file diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/EnigmaSoulsJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/EnigmaSoulsJson.java new file mode 100644 index 000000000..23179f5df --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/EnigmaSoulsJson.java @@ -0,0 +1,19 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import at.hannibal2.skyhanni.utils.LorenzVec; +import com.google.gson.annotations.Expose; + +import java.util.List; +import java.util.Map; + +public class EnigmaSoulsJson { + @Expose + public Map> areas; + + public static class EnigmaPosition { + @Expose + public String name; + @Expose + public LorenzVec position; + } +} \ No newline at end of file -- cgit