aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/commands
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-01 18:00:43 +0200
committerLinnea Gräf <nea@nea.moe>2024-10-01 18:00:43 +0200
commita4eac70118fc25334c9352712fe3c7944b8bed1d (patch)
treee0faedfca323e243a64a427d13b4fb31bcea9256 /src/main/kotlin/commands
parentbeb14d73bd2d0d48513e540ff629b48f89b95ed9 (diff)
downloadFirmament-a4eac70118fc25334c9352712fe3c7944b8bed1d.tar.gz
Firmament-a4eac70118fc25334c9352712fe3c7944b8bed1d.tar.bz2
Firmament-a4eac70118fc25334c9352712fe3c7944b8bed1d.zip
Add basic sack util
[no changelog]
Diffstat (limited to 'src/main/kotlin/commands')
-rw-r--r--src/main/kotlin/commands/rome.kt11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt
index afb3cae..cc4f4ba 100644
--- a/src/main/kotlin/commands/rome.kt
+++ b/src/main/kotlin/commands/rome.kt
@@ -4,7 +4,9 @@ import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.arguments.StringArgumentType.string
import io.ktor.client.statement.bodyAsText
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource
+import net.minecraft.nbt.NbtOps
import net.minecraft.text.Text
+import net.minecraft.text.TextCodecs
import moe.nea.firmament.apis.UrsaManager
import moe.nea.firmament.events.CommandEvent
import moe.nea.firmament.events.FirmamentEventBus
@@ -24,6 +26,7 @@ import moe.nea.firmament.util.MC
import moe.nea.firmament.util.SBData
import moe.nea.firmament.util.ScreenUtil
import moe.nea.firmament.util.SkyblockId
+import moe.nea.firmament.util.accessors.messages
import moe.nea.firmament.util.collections.InstanceList
import moe.nea.firmament.util.collections.WeakCache
@@ -205,6 +208,14 @@ fun firmamentCommand() = literal("firmament") {
}
}
}
+ thenLiteral("dumpchat") {
+ thenExecute {
+ MC.inGameHud.chatHud.messages.forEach {
+ val nbt = TextCodecs.CODEC.encodeStart(NbtOps.INSTANCE, it.content).orThrow
+ println(nbt)
+ }
+ }
+ }
thenLiteral("sbdata") {
thenExecute {
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.profile", SBData.profileId))