diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-10-13 21:09:29 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-13 21:09:29 +0200 |
| commit | 05160314e6899ece75779dbd2e5b691ed581c2b9 (patch) | |
| tree | 1a510d4d8d3fe692b980a4762b3634874d5d7dc2 /src/main/kotlin/commands | |
| parent | 0d903f93d35410a81f7be073511487903ff49516 (diff) | |
| download | Firmament-05160314e6899ece75779dbd2e5b691ed581c2b9.tar.gz Firmament-05160314e6899ece75779dbd2e5b691ed581c2b9.tar.bz2 Firmament-05160314e6899ece75779dbd2e5b691ed581c2b9.zip | |
feat: add debug mode to custom block texture areas
Diffstat (limited to 'src/main/kotlin/commands')
| -rw-r--r-- | src/main/kotlin/commands/rome.kt | 9 |
1 files changed, 5 insertions, 4 deletions
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<FabricClientCommandSource>) { - val firmament = dispatcher.register(firmamentCommand()) +fun registerFirmamentCommand(dispatcher: CommandDispatcher<FabricClientCommandSource>, ctx: CommandRegistryAccess) { + val firmament = dispatcher.register(firmamentCommand(ctx)) dispatcher.register(literal("firm") { redirect(firmament) }) |
