Interface IKeyRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
KeyRegistry
public interface IKeyRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Hotkey registry
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addKeyHandler
(net.minecraft.client.KeyMapping kb, IKeyHandler handler) Binds aIKeyHandler
to key presses of the specifiedKeyMapping
.void
onPlayerKeyInput
(net.neoforged.neoforge.client.event.InputEvent.Key event) Handles key presses for keybindings added by EvilCraft Make sure to annotate this withSubscribeEvent
-
Method Details
-
onPlayerKeyInput
void onPlayerKeyInput(net.neoforged.neoforge.client.event.InputEvent.Key event) Handles key presses for keybindings added by EvilCraft Make sure to annotate this withSubscribeEvent
- Parameters:
event
- The input event.
-
addKeyHandler
Binds aIKeyHandler
to key presses of the specifiedKeyMapping
. Whenever theKeyMapping
is pressed,IKeyHandler.onKeyPressed(KeyMapping)
} is called.- Parameters:
kb
-KeyMapping
to which we bind theIKeyHandler
.handler
-IKeyHandler
that will be linked to presses of the givenKeyMapping
.
-