Interface IKeyRegistry
- All Superinterfaces:
IRegistry
- All Known Implementing Classes:
KeyRegistry
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.minecraftforge.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.minecraftforge.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
.
-