From a4eac70118fc25334c9352712fe3c7944b8bed1d Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 1 Oct 2024 18:00:43 +0200 Subject: Add basic sack util [no changelog] --- src/main/kotlin/commands/rome.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main/kotlin/commands/rome.kt') 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)) -- cgit