summaryrefslogtreecommitdiff
path: root/src/main/kotlin/event/TickEvent.kt
blob: 864326117d5a3a3cb59366ac622530b8407829af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package moe.nea.ultranotifier.event

//#if FABRIC
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
//#endif

class TickEvent : UltraEvent() {

	companion object {
		init {
//#if FABRIC
			ClientTickEvents.END_CLIENT_TICK.register(ClientTickEvents.EndTick {
				TickEvent().post()
			})
//#else
//$$			net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(object {
//$$				@UltraSubscribe
//$$				fun onForgeEvent(event: net.minecraftforge.event.TickEvent.ClientTickEvent) {
//$$					if (event.phase == net.minecraftforge.event.TickEvent.Phase.END)
//$$						TickEvent().post()
//$$				}
//$$			})
//#endif
		}
	}
}