Move KeyMappings and KeyAccessor to fabric, to replace them using a RegisterKeyMappingsEvent in neoforge
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
2fa0575f68
commit
9503ac000b
|
@ -3,8 +3,6 @@
|
|||
"package": "fr.username404.snowygui.mixins",
|
||||
"compatibilityLevel": "JAVA_18",
|
||||
"client": [
|
||||
"KeysAccessor",
|
||||
"KeyMappings",
|
||||
"OptionValueAccessor"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
"client": [
|
||||
"EndTickMixin",
|
||||
"TitleScreenMixin",
|
||||
"KeysAccessor",
|
||||
"KeyMappings",
|
||||
"ZoomMixin",
|
||||
"OkZoomerAlternativeMixin"
|
||||
],
|
||||
|
|
|
@ -2,7 +2,9 @@ package fr.username404.snowygui.forge
|
|||
|
||||
import fr.username404.snowygui.ClickGui
|
||||
import fr.username404.snowygui.gui.feature.ButtonImpl
|
||||
import fr.username404.snowygui.misc.AddKeyMaps
|
||||
import net.neoforged.bus.api.SubscribeEvent
|
||||
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent
|
||||
import net.neoforged.neoforge.client.event.RegisterMenuScreensEvent
|
||||
|
||||
object MiscHandlers {
|
||||
|
@ -11,4 +13,10 @@ object MiscHandlers {
|
|||
ClickGui.tick()
|
||||
ButtonImpl.initButtons()
|
||||
}
|
||||
@SubscribeEvent
|
||||
fun handleKeys(event: RegisterKeyMappingsEvent) {
|
||||
AddKeyMaps.list.forEach {
|
||||
event.register(it.key)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue