Interface IKeyRegistry

All Superinterfaces:
IRegistry
All Known Implementing Classes:
KeyRegistry

public interface IKeyRegistry extends IRegistry
Hotkey registry
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addKeyHandler(net.minecraft.client.KeyMapping kb, IKeyHandler handler)
    Binds a IKeyHandler to key presses of the specified KeyMapping.
    void
    onPlayerKeyInput(net.neoforged.neoforge.client.event.InputEvent.Key event)
    Handles key presses for keybindings added by EvilCraft Make sure to annotate this with SubscribeEvent
  • 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 with SubscribeEvent
      Parameters:
      event - The input event.
    • addKeyHandler

      void addKeyHandler(net.minecraft.client.KeyMapping kb, IKeyHandler handler)
      Binds a IKeyHandler to key presses of the specified KeyMapping. Whenever the KeyMapping is pressed, IKeyHandler.onKeyPressed(KeyMapping)} is called.
      Parameters:
      kb - KeyMapping to which we bind the IKeyHandler.
      handler - IKeyHandler that will be linked to presses of the given KeyMapping.