diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/Firmament.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/Firmament.kt | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/Firmament.kt b/src/main/kotlin/moe/nea/firmament/Firmament.kt index 6a6007e..3681ab6 100644 --- a/src/main/kotlin/moe/nea/firmament/Firmament.kt +++ b/src/main/kotlin/moe/nea/firmament/Firmament.kt @@ -14,19 +14,8 @@ import io.ktor.client.plugins.compression.* import io.ktor.client.plugins.contentnegotiation.* import io.ktor.client.plugins.logging.* import io.ktor.serialization.kotlinx.json.* -import kotlinx.coroutines.* -import kotlinx.serialization.json.Json -import moe.nea.firmament.commands.registerFirmamentCommand -import moe.nea.firmament.dbus.FirmamentDbusObject -import moe.nea.firmament.events.ItemTooltipEvent -import moe.nea.firmament.events.ScreenRenderPostEvent -import moe.nea.firmament.events.TickEvent -import moe.nea.firmament.events.registration.registerFirmamentChatEvents -import moe.nea.firmament.features.FeatureManager -import moe.nea.firmament.repo.HypixelStaticData -import moe.nea.firmament.repo.RepoManager -import moe.nea.firmament.util.SBData -import moe.nea.firmament.util.data.IDataHolder +import java.nio.file.Files +import java.nio.file.Path import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents @@ -36,15 +25,32 @@ import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents import net.fabricmc.loader.api.FabricLoader import net.fabricmc.loader.api.Version import net.fabricmc.loader.api.metadata.ModMetadata -import net.minecraft.command.CommandRegistryAccess -import net.minecraft.util.Identifier import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger import org.freedesktop.dbus.connections.impl.DBusConnectionBuilder import org.freedesktop.dbus.exceptions.DBusException -import java.nio.file.Files -import java.nio.file.Path +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.plus +import kotlinx.coroutines.runBlocking +import kotlinx.serialization.json.Json import kotlin.coroutines.EmptyCoroutineContext +import net.minecraft.command.CommandRegistryAccess +import net.minecraft.util.Identifier +import moe.nea.firmament.commands.registerFirmamentCommand +import moe.nea.firmament.dbus.FirmamentDbusObject +import moe.nea.firmament.events.CommandEvent +import moe.nea.firmament.events.ItemTooltipEvent +import moe.nea.firmament.events.ScreenRenderPostEvent +import moe.nea.firmament.events.TickEvent +import moe.nea.firmament.events.registration.registerFirmamentChatEvents +import moe.nea.firmament.features.FeatureManager +import moe.nea.firmament.repo.HypixelStaticData +import moe.nea.firmament.repo.RepoManager +import moe.nea.firmament.util.SBData +import moe.nea.firmament.util.data.IDataHolder object Firmament { const val MOD_ID = "firmament" @@ -101,6 +107,7 @@ object Firmament { ctx: CommandRegistryAccess ) { registerFirmamentCommand(dispatcher) + CommandEvent.publish(CommandEvent(dispatcher, ctx)) } @JvmStatic |