aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/events
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-07-22 03:08:56 +0200
committernea <nea@nea.moe>2023-07-22 03:08:56 +0200
commitcdf3938b778188211ad316d16381e0d8c7beac75 (patch)
treeeb3508942f61bee290b0558c97c3e04946070b0a /src/main/kotlin/moe/nea/firmament/events
parent538827af3bfccbc4cee1ff2e9cb76922108ace9e (diff)
downloadFirmament-cdf3938b778188211ad316d16381e0d8c7beac75.tar.gz
Firmament-cdf3938b778188211ad316d16381e0d8c7beac75.tar.bz2
Firmament-cdf3938b778188211ad316d16381e0d8c7beac75.zip
Add image preview
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events')
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt1
-rw-r--r--src/main/kotlin/moe/nea/firmament/events/ScreenRenderPostEvent.kt14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
index 604422d..7af411d 100644
--- a/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
+++ b/src/main/kotlin/moe/nea/firmament/events/ClientChatLineReceivedEvent.kt
@@ -9,6 +9,7 @@ import moe.nea.firmament.util.unformattedString
*/
data class ClientChatLineReceivedEvent(val text: Text) : FirmamentEvent.Cancellable() {
val unformattedString = text.unformattedString
+ var replaceWith: Text = text
companion object : FirmamentEventBus<ClientChatLineReceivedEvent>()
}
diff --git a/src/main/kotlin/moe/nea/firmament/events/ScreenRenderPostEvent.kt b/src/main/kotlin/moe/nea/firmament/events/ScreenRenderPostEvent.kt
new file mode 100644
index 0000000..2d061a2
--- /dev/null
+++ b/src/main/kotlin/moe/nea/firmament/events/ScreenRenderPostEvent.kt
@@ -0,0 +1,14 @@
+package moe.nea.firmament.events
+
+import net.minecraft.client.gui.DrawContext
+import net.minecraft.client.gui.screen.Screen
+
+data class ScreenRenderPostEvent(
+ val screen: Screen,
+ val mouseX: Int,
+ val mouseY: Int,
+ val tickDelta: Float,
+ val drawContext: DrawContext
+) : FirmamentEvent() {
+ companion object : FirmamentEventBus<ScreenRenderPostEvent>()
+}