From 05160314e6899ece75779dbd2e5b691ed581c2b9 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 13 Oct 2025 21:09:29 +0200 Subject: feat: add debug mode to custom block texture areas --- src/main/kotlin/commands/rome.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin/commands') diff --git a/src/main/kotlin/commands/rome.kt b/src/main/kotlin/commands/rome.kt index affc860..97acf73 100644 --- a/src/main/kotlin/commands/rome.kt +++ b/src/main/kotlin/commands/rome.kt @@ -6,6 +6,7 @@ import com.mojang.brigadier.arguments.StringArgumentType.string import io.ktor.client.statement.bodyAsText import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource import kotlinx.coroutines.launch +import net.minecraft.command.CommandRegistryAccess import net.minecraft.nbt.NbtOps import net.minecraft.text.Text import net.minecraft.text.TextCodecs @@ -45,7 +46,7 @@ import moe.nea.firmament.util.tr import moe.nea.firmament.util.unformattedString -fun firmamentCommand() = literal("firmament") { +fun firmamentCommand(ctx: CommandRegistryAccess) = literal("firmament") { thenLiteral("config") { thenExecute { AllConfigsGui.showAllGuis() @@ -406,12 +407,12 @@ fun firmamentCommand() = literal("firmament") { thenExecute { AllConfigsGui.showAllGuis() } - CommandEvent.SubCommand.publish(CommandEvent.SubCommand(this@literal)) + CommandEvent.SubCommand.publish(CommandEvent.SubCommand(this@literal, ctx)) } -fun registerFirmamentCommand(dispatcher: CommandDispatcher) { - val firmament = dispatcher.register(firmamentCommand()) +fun registerFirmamentCommand(dispatcher: CommandDispatcher, ctx: CommandRegistryAccess) { + val firmament = dispatcher.register(firmamentCommand(ctx)) dispatcher.register(literal("firm") { redirect(firmament) }) -- cgit