public class ModLoaderKeyBindingHandler extends KeyBindingRegistry.KeyHandler
Constructor and Description |
---|
ModLoaderKeyBindingHandler() |
Modifier and Type | Method and Description |
---|---|
void |
fireKeyEvent(KeyBinding kb) |
String |
getLabel()
A profiling label for this tick handler
|
void |
keyDown(EnumSet<TickType> type,
KeyBinding kb,
boolean end,
boolean repeats)
Called when the key is first in the down position on any tick from the
KeyBindingRegistry.KeyHandler.ticks()
set. |
void |
keyUp(EnumSet<TickType> type,
KeyBinding kb,
boolean end)
Fired once when the key changes state from down to up
|
EnumSet<TickType> |
ticks()
This is the list of ticks for which the key binding should trigger.
|
getKeyBindings, tickEnd, tickStart
public void fireKeyEvent(KeyBinding kb)
public void keyDown(EnumSet<TickType> type, KeyBinding kb, boolean end, boolean repeats)
KeyBindingRegistry.KeyHandler
KeyBindingRegistry.KeyHandler.ticks()
set. Will be called subsequently with isRepeat set to truekeyDown
in class KeyBindingRegistry.KeyHandler
type
- the type(s) of tick that fired when this key was first downend
- was it an end or start tick which fired the keyrepeats
- is it a repeat key eventKeyBindingRegistry.KeyHandler.keyUp(EnumSet, KeyBinding, boolean)
public void keyUp(EnumSet<TickType> type, KeyBinding kb, boolean end)
KeyBindingRegistry.KeyHandler
keyUp
in class KeyBindingRegistry.KeyHandler
type
- the type(s) of tick that fired when this key was first downend
- was it an end or start tick which fired the keyKeyBindingRegistry.KeyHandler.keyDown(EnumSet, KeyBinding, boolean, boolean)
public EnumSet<TickType> ticks()
KeyBindingRegistry.KeyHandler
ticks
in interface ITickHandler
ticks
in class KeyBindingRegistry.KeyHandler
ITickHandler.ticks()
public String getLabel()
ITickHandler