From c93a04a001b0f66b2724d46b04b6d1ed49a08d07 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 17 Nov 2025 19:55:02 +0100 Subject: refactor: port to mojmaps --- src/main/kotlin/Firmament.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/kotlin/Firmament.kt') diff --git a/src/main/kotlin/Firmament.kt b/src/main/kotlin/Firmament.kt index e707667..72f386d 100644 --- a/src/main/kotlin/Firmament.kt +++ b/src/main/kotlin/Firmament.kt @@ -27,8 +27,8 @@ import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream import kotlin.coroutines.EmptyCoroutineContext -import net.minecraft.command.CommandRegistryAccess -import net.minecraft.util.Identifier +import net.minecraft.commands.CommandBuildContext +import net.minecraft.resources.ResourceLocation import moe.nea.firmament.commands.registerFirmamentCommand import moe.nea.firmament.events.ClientInitEvent import moe.nea.firmament.events.ClientStartedEvent @@ -93,10 +93,10 @@ object Firmament { private fun registerCommands( dispatcher: CommandDispatcher, @Suppress("UNUSED_PARAMETER") - ctx: CommandRegistryAccess + ctx: CommandBuildContext ) { registerFirmamentCommand(dispatcher, ctx) - CommandEvent.publish(CommandEvent(dispatcher, ctx, MC.networkHandler?.commandDispatcher)) + CommandEvent.publish(CommandEvent(dispatcher, ctx, MC.networkHandler?.commands)) } @JvmStatic @@ -142,7 +142,7 @@ object Firmament { } - fun identifier(path: String) = Identifier.of(MOD_ID, path) + fun identifier(path: String) = ResourceLocation.fromNamespaceAndPath(MOD_ID, path) inline fun tryDecodeJsonFromStream(inputStream: InputStream): Result { return runCatching { json.decodeFromStream(inputStream) -- cgit