Interface IKeyMappingHelper
@NonExtendable
public interface IKeyMappingHelper
Creates immutable binding snapshots.
Obtain this helper from
IConfigGuiRegistration.getKeyMappingHelper().- Since:
- 0.6.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateBinding(com.mojang.blaze3d.platform.InputConstants.Key key, Set<KeyMappingModifier> modifiers) Create a binding with an immutable copy of its modifiers.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.
-
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, orInputConstants.UNKNOWNfor an unbound bindingmodifiers- 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, orInputConstants.UNKNOWNfor an unbound bindingmodifiers- the standard modifiers required by the bindingcustomModifiers- additional identifiers matching[a-z0-9_.:/-]+, excluding standard modifier names andnone- Returns:
- an immutable binding snapshot
- Throws:
IllegalArgumentException- if a custom identifier is invalid or reserved- Since:
- 0.6.0
-