Move EndTickMixin to fabric, to replace it using a ClientTickEvent in neoforge
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
b4574ef5b8
commit
febeddb093
|
@ -5,7 +5,6 @@
|
||||||
"client": [
|
"client": [
|
||||||
"KeysAccessor",
|
"KeysAccessor",
|
||||||
"KeyMappings",
|
"KeyMappings",
|
||||||
"EndTickMixin",
|
|
||||||
"TitleScreenMixin",
|
"TitleScreenMixin",
|
||||||
"OptionValueAccessor"
|
"OptionValueAccessor"
|
||||||
],
|
],
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
"package": "fr.username404.snowygui.mixins",
|
"package": "fr.username404.snowygui.mixins",
|
||||||
"compatibilityLevel": "JAVA_18",
|
"compatibilityLevel": "JAVA_18",
|
||||||
"client": [
|
"client": [
|
||||||
|
"EndTickMixin",
|
||||||
"ZoomMixin",
|
"ZoomMixin",
|
||||||
"OkZoomerAlternativeMixin"
|
"OkZoomerAlternativeMixin"
|
||||||
],
|
],
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package fr.username404.snowygui.forge
|
||||||
|
|
||||||
|
import fr.username404.snowygui.EventSnowy
|
||||||
|
import net.neoforged.bus.api.SubscribeEvent
|
||||||
|
import net.neoforged.neoforge.client.event.ClientTickEvent
|
||||||
|
|
||||||
|
object EndTickHandler: EventSnowy {
|
||||||
|
override val type: String = "EndTick"
|
||||||
|
@SubscribeEvent
|
||||||
|
fun handleEndTick(event: ClientTickEvent.Post) = fire<Any>()
|
||||||
|
}
|
|
@ -29,6 +29,7 @@ class ForgeInit(container: ModContainer): Snowy() {
|
||||||
init {
|
init {
|
||||||
container.eventBus!!.run {
|
container.eventBus!!.run {
|
||||||
addListener(this@ForgeInit::initSetup)
|
addListener(this@ForgeInit::initSetup)
|
||||||
|
register(EndTickHandler)
|
||||||
register(HudHandler)
|
register(HudHandler)
|
||||||
register(ZoomHandler)
|
register(ZoomHandler)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue