diff --git a/beta-changelog.md b/beta-changelog.md index e70d261..f56e878 100644 --- a/beta-changelog.md +++ b/beta-changelog.md @@ -2,8 +2,9 @@ none ## Bug Fixes -- fix Crystal state not recognized correctly on find -- fix double powder not recognized correctly +- fix crystal state not being recognized correctly +- fix double powder not being recognized correctly +- update structure select message ## Technical changes none \ No newline at end of file diff --git a/src/main/kotlin/dev/nyon/skylper/skyblock/mining/hollows/locations/PlayerChatLocationListener.kt b/src/main/kotlin/dev/nyon/skylper/skyblock/mining/hollows/locations/PlayerChatLocationListener.kt index ac53ed7..2d22b16 100644 --- a/src/main/kotlin/dev/nyon/skylper/skyblock/mining/hollows/locations/PlayerChatLocationListener.kt +++ b/src/main/kotlin/dev/nyon/skylper/skyblock/mining/hollows/locations/PlayerChatLocationListener.kt @@ -1,11 +1,12 @@ package dev.nyon.skylper.skyblock.mining.hollows.locations import dev.nyon.skylper.config.config -import dev.nyon.skylper.extensions.* import dev.nyon.skylper.extensions.event.EventHandler import dev.nyon.skylper.extensions.event.EventHandler.listenEvent import dev.nyon.skylper.extensions.event.LocatedHollowsStructureEvent import dev.nyon.skylper.extensions.event.MessageEvent +import dev.nyon.skylper.extensions.groups +import dev.nyon.skylper.extensions.regex import dev.nyon.skylper.minecraft import dev.nyon.skylper.skyblock.mining.hollows.HollowsModule import net.minecraft.ChatFormatting @@ -25,7 +26,11 @@ object PlayerChatLocationListener { val loc = regex.groups(rawMessage).let { if (it.isEmpty()) return@let null - return@let Vec3(it[2].toDoubleOrNull() ?: 0.0, it[3].toDoubleOrNull() ?: 35.0, it[4].toDoubleOrNull() ?: 0.0) + return@let Vec3( + it[2].toDoubleOrNull() ?: 0.0, + it[3].toDoubleOrNull() ?: 35.0, + it[4].toDoubleOrNull() ?: 0.0 + ) } ?: return@listenEvent if (!HollowsModule.hollowsBox.contains(loc)) return@listenEvent @@ -56,15 +61,13 @@ object PlayerChatLocationListener { val locationsComponent = PreDefinedHollowsLocationSpecific.entries.map { specific -> specific.displayName.copy().withStyle { - it.withColor(ChatFormatting.RED) val command = "/skylper hollows waypoints set ${specific.key} ${pos.x.toInt()} ${pos.y.toInt()} ${pos.z.toInt()}" it.withClickEvent(ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, command)) } }.fold(Component.empty()) { acc, new -> if (acc != Component.empty()) acc.append(Component.literal(", ").withStyle(ChatFormatting.WHITE)) - acc.append(new) - acc + acc.append(new.withStyle(ChatFormatting.RED)) } val finalComponent = Component.translatable("chat.skylper.hollows.locations.pick", locationsComponent)