Class RegisterKeyMappingsEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterKeyMappingsEvent
All Implemented Interfaces:
IModBusEvent

public class RegisterKeyMappingsEvent extends net.minecraftforge.eventbus.api.Event implements IModBusEvent
Allows users to register custom key mappings.

This event is not cancellable, and does not have a result.

This event is fired on the mod-specific event bus, only on the logical client.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Options
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers a new key mapping.

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • options

      private final Options options
  • Constructor Details

    • RegisterKeyMappingsEvent

      @Internal public RegisterKeyMappingsEvent(Options options)
  • Method Details

    • register

      public void register(KeyMapping key)
      Registers a new key mapping.