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 TypeMethodDescriptionvoidaddKeyHandler(net.minecraft.client.KeyMapping kb, IKeyHandler handler) Binds aIKeyHandlerto key presses of the specifiedKeyMapping.voidonPlayerKeyInput(net.neoforged.neoforge.client.event.ClientTickEvent.Post 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.ClientTickEvent.Post event) Handles key presses for keybindings added by EvilCraft Make sure to annotate this withSubscribeEvent- Parameters:
event- The input event.
-
addKeyHandler
Binds aIKeyHandlerto key presses of the specifiedKeyMapping. Whenever theKeyMappingis pressed,IKeyHandler.onKeyPressed(KeyMapping)} is called.- Parameters:
kb-KeyMappingto which we bind theIKeyHandler.handler-IKeyHandlerthat will be linked to presses of the givenKeyMapping.
-