diff options
author | nea <nea@nea.moe> | 2023-08-31 19:38:38 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-31 21:22:26 +0200 |
commit | cb032e7c221e40736ab26b193eea4e32d06113d9 (patch) | |
tree | e49047b3b78fb9887d72cbe9458af44ecbc179d4 /src/main/kotlin/moe/nea/firmament/Firmament.kt | |
parent | b7b01f1c6fbf889ae9bfcdb5b34c5ccfa48d5ba0 (diff) | |
download | Firmament-cb032e7c221e40736ab26b193eea4e32d06113d9.tar.gz Firmament-cb032e7c221e40736ab26b193eea4e32d06113d9.tar.bz2 Firmament-cb032e7c221e40736ab26b193eea4e32d06113d9.zip |
Add price tooltips
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/Firmament.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/Firmament.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/Firmament.kt b/src/main/kotlin/moe/nea/firmament/Firmament.kt index 1a2739e..e4b874a 100644 --- a/src/main/kotlin/moe/nea/firmament/Firmament.kt +++ b/src/main/kotlin/moe/nea/firmament/Firmament.kt @@ -14,13 +14,13 @@ 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 java.lang.Exception 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 import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents +import net.fabricmc.fabric.api.client.item.v1.ItemTooltipCallback import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents import net.fabricmc.loader.api.FabricLoader import net.fabricmc.loader.api.Version @@ -41,6 +41,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.ItemTooltipEvent import moe.nea.firmament.events.ScreenRenderPostEvent import moe.nea.firmament.events.TickEvent import moe.nea.firmament.features.FeatureManager @@ -133,6 +134,9 @@ object Firmament { globalJob.cancel() } }) + ItemTooltipCallback.EVENT.register { a, b, c -> + ItemTooltipEvent.publish(ItemTooltipEvent(a, b, c)) + } ScreenEvents.AFTER_INIT.register(ScreenEvents.AfterInit { client, screen, scaledWidth, scaledHeight -> ScreenEvents.afterRender(screen) .register(ScreenEvents.AfterRender { screen, drawContext, mouseX, mouseY, tickDelta -> |