Interface IKeyMappingHelper


@NonExtendable public interface IKeyMappingHelper
Creates immutable binding snapshots. Obtain this helper from IConfigGuiRegistration.getKeyMappingHelper().
Since:
0.6.0
  • Method Details

    • createBinding

      IKeyMappingBinding createBinding(com.mojang.blaze3d.platform.InputConstants.Key key, Set<KeyMappingModifier> modifiers)
      Create a binding with an immutable copy of its modifiers. An unbound binding has no modifiers.
      Parameters:
      key - the keyboard or mouse input, or InputConstants.UNKNOWN for an unbound binding
      modifiers - the standard modifiers required by the binding
      Returns:
      an immutable binding snapshot
      Since:
      0.6.0
    • createBinding

      IKeyMappingBinding createBinding(com.mojang.blaze3d.platform.InputConstants.Key key, Set<KeyMappingModifier> modifiers, Set<String> customModifiers)
      Create a binding that also requires custom modifiers supplied by other mods. An unbound binding has no modifiers.
      Parameters:
      key - the keyboard or mouse input, or InputConstants.UNKNOWN for an unbound binding
      modifiers - the standard modifiers required by the binding
      customModifiers - additional identifiers matching [a-z0-9_.:/-]+, excluding standard modifier names and none
      Returns:
      an immutable binding snapshot
      Throws:
      IllegalArgumentException - if a custom identifier is invalid or reserved
      Since:
      0.6.0