Update client event hook
This commit is contained in:
parent
302076b90b
commit
b38d34860c
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user