diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientTickHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientTickHandler.kt index d9bd0339d..3ed27faeb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientTickHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/ClientTickHandler.kt @@ -2,6 +2,7 @@ package ru.dbotthepony.mc.otm.client import net.neoforged.neoforge.client.event.ClientPlayerNetworkEvent import net.neoforged.neoforge.client.event.ClientTickEvent +import net.neoforged.neoforge.client.event.RenderFrameEvent import org.lwjgl.glfw.GLFW import ru.dbotthepony.mc.otm.core.util.IConditionalTickable import ru.dbotthepony.mc.otm.core.util.ITickable @@ -48,12 +49,10 @@ enum class CursorType(val pointer: LongSupplier) { } } -fun onClientPostRender(event: RenderTickEvent) { - if (event.phase == TickEvent.Phase.END) { - if (MODIFIED_CURSOR_FRAMES-- <= 0 && MODIFIED_CURSOR) { - GLFW.glfwSetCursor(minecraft.window.window, ARROW_CURSOR) - MODIFIED_CURSOR = false - } +fun onClientPostRender(event: RenderFrameEvent.Post) { + if (MODIFIED_CURSOR_FRAMES-- <= 0 && MODIFIED_CURSOR) { + GLFW.glfwSetCursor(minecraft.window.window, ARROW_CURSOR) + MODIFIED_CURSOR = false } }