aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-05 22:17:02 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-05 22:17:02 +0200
commit3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7 (patch)
treeb383c2c584a96b93c46d1dae3efcd3c6571e3d05 /src/main/kotlin/moe/nea/firmament/events
parent5ee4b8d925eb12e068038a1fd2e1f35cdd8ef87e (diff)
downloadFirmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.tar.gz
Firmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.tar.bz2
Firmament-3d792dbef7c7e0f186e29f2e3999f99c2c14f5d7.zip
Port to 1.21
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/HotbarItemRenderEvent.kt11
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/HudRenderEvent.kt3
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/ItemTooltipEvent.kt2
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/WorldRenderLastEvent.kt8
4 files changed, 11 insertions, 13 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/HotbarItemRenderEvent.kt b/src/main/kotlin/moe/nea/firmament/events/HotbarItemRenderEvent.kt
index 59660ce..d105737 100644
--- a/src/main/kotlin/moe/nea/firmament/events/HotbarItemRenderEvent.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/HotbarItemRenderEvent.kt
@@ -7,14 +7,15 @@
package moe.nea.firmament.events
import net.minecraft.client.gui.DrawContext
+import net.minecraft.client.render.RenderTickCounter
import net.minecraft.item.ItemStack
data class HotbarItemRenderEvent(
- val item: ItemStack,
- val context: DrawContext,
- val x: Int,
- val y: Int,
- val tickDelta: Float,
+ val item: ItemStack,
+ val context: DrawContext,
+ val x: Int,
+ val y: Int,
+ val tickDelta: RenderTickCounter,
) : FirmamentEvent() {
companion object : FirmamentEventBus<HotbarItemRenderEvent>()
}
diff --git a/src/main/kotlin/moe/nea/firmament/events/HudRenderEvent.kt b/src/main/kotlin/moe/nea/firmament/events/HudRenderEvent.kt
index bf008d3..8b8e31d 100644
--- a/src/main/kotlin/moe/nea/firmament/events/HudRenderEvent.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/HudRenderEvent.kt
@@ -7,10 +7,11 @@
package moe.nea.firmament.events
import net.minecraft.client.gui.DrawContext
+import net.minecraft.client.render.RenderTickCounter
/**
* Called when hud elements should be rendered, before the screen, but after the world.
*/
-data class HudRenderEvent(val context: DrawContext, val tickDelta: Float) : FirmamentEvent() {
+data class HudRenderEvent(val context: DrawContext, val tickDelta: RenderTickCounter) : FirmamentEvent() {
companion object : FirmamentEventBus<HudRenderEvent>()
}
diff --git a/src/main/kotlin/moe/nea/firmament/events/ItemTooltipEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ItemTooltipEvent.kt
index 94a1678..be9a659 100644
--- a/src/main/kotlin/moe/nea/firmament/events/ItemTooltipEvent.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/ItemTooltipEvent.kt
@@ -7,9 +7,9 @@
package moe.nea.firmament.events
-import net.minecraft.client.item.TooltipType
import net.minecraft.item.Item.TooltipContext
import net.minecraft.item.ItemStack
+import net.minecraft.item.tooltip.TooltipType
import net.minecraft.text.Text
data class ItemTooltipEvent(
diff --git a/src/main/kotlin/moe/nea/firmament/events/WorldRenderLastEvent.kt b/src/main/kotlin/moe/nea/firmament/events/WorldRenderLastEvent.kt
index b42e9ab..7ba9b9f 100644
--- a/src/main/kotlin/moe/nea/firmament/events/WorldRenderLastEvent.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/WorldRenderLastEvent.kt
@@ -7,10 +7,10 @@
package moe.nea.firmament.events
-import org.joml.Matrix4f
import net.minecraft.client.render.Camera
import net.minecraft.client.render.GameRenderer
import net.minecraft.client.render.LightmapTextureManager
+import net.minecraft.client.render.RenderTickCounter
import net.minecraft.client.render.VertexConsumerProvider
import net.minecraft.client.util.math.MatrixStack
import net.minecraft.util.math.Position
@@ -21,7 +21,7 @@ import net.minecraft.util.math.Vec3d
*/
data class WorldRenderLastEvent(
val matrices: MatrixStack,
- val tickDelta: Float,
+ val tickCounter: RenderTickCounter,
val renderBlockOutline: Boolean,
val camera: Camera,
val gameRenderer: GameRenderer,
@@ -29,8 +29,4 @@ data class WorldRenderLastEvent(
val vertexConsumers: VertexConsumerProvider.Immediate,
) : FirmamentEvent() {
companion object : FirmamentEventBus<WorldRenderLastEvent>()
- data class TextRenderCall(val string: String, val position: Position)
-
- val toRender = mutableListOf<TextRenderCall>(TextRenderCall("Test String", Vec3d(0.0, 0.0, 0.0)))
-
}