aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/Firmament.kt
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-11 21:01:58 +0200
committernea <nea@nea.moe>2023-07-11 21:01:58 +0200
commit4d93f475aadc42c4bf83c3a0749af41659235c71 (patch)
treec8e01710defe66e06c50fa962c72fdac66a35a1f /src/main/kotlin/moe/nea/firmament/Firmament.kt
parent4444fcca44d9a53c8162d69e0e9f19fd214c2f54 (diff)
downloadFirmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.gz
Firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.tar.bz2
Firmament-4d93f475aadc42c4bf83c3a0749af41659235c71.zip
Bulk commit
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/Firmament.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/Firmament.kt21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/Firmament.kt b/src/main/kotlin/moe/nea/firmament/Firmament.kt
index 2e1cd05..46329f1 100644
--- a/src/main/kotlin/moe/nea/firmament/Firmament.kt
+++ b/src/main/kotlin/moe/nea/firmament/Firmament.kt
@@ -19,13 +19,15 @@
package moe.nea.firmament
import com.mojang.brigadier.CommandDispatcher
-import io.ktor.client.*
-import io.ktor.client.plugins.*
-import io.ktor.client.plugins.cache.*
-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 dev.architectury.event.events.client.ClientTickEvent
+import io.ktor.client.HttpClient
+import io.ktor.client.plugins.UserAgent
+import io.ktor.client.plugins.cache.HttpCache
+import io.ktor.client.plugins.compression.ContentEncoding
+import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
+import io.ktor.client.plugins.logging.LogLevel
+import io.ktor.client.plugins.logging.Logging
+import io.ktor.serialization.kotlinx.json.json
import java.nio.file.Files
import java.nio.file.Path
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback
@@ -49,6 +51,7 @@ 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.TickEvent
import moe.nea.firmament.features.FeatureManager
import moe.nea.firmament.repo.HypixelStaticData
import moe.nea.firmament.repo.RepoManager
@@ -114,6 +117,10 @@ object Firmament {
@JvmStatic
fun onClientInitialize() {
dbusConnection.requestBusName("moe.nea.firmament")
+ var tick = 0
+ ClientTickEvent.CLIENT_POST.register(ClientTickEvent.Client { instance ->
+ TickEvent.publish(TickEvent(tick++))
+ })
dbusConnection.exportObject(FirmamentDbusObject)
IDataHolder.registerEvents()
RepoManager.initialize()