Enum KeyModifier
- java.lang.Object
-
- java.lang.Enum<KeyModifier>
-
- net.minecraftforge.client.settings.KeyModifier
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<KeyModifier>
public enum KeyModifier extends java.lang.Enum<KeyModifier>
-
-
Field Summary
Fields Modifier and Type Field Description static KeyModifier[]
MODIFIER_VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
KeyModifier()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static KeyModifier
getActiveModifier()
abstract ITextComponent
getCombinedName(InputMappings.Input key, java.util.function.Supplier<ITextComponent> defaultLogic)
abstract boolean
isActive(IKeyConflictContext conflictContext)
static boolean
isKeyCodeModifier(InputMappings.Input key)
abstract boolean
matches(InputMappings.Input key)
static KeyModifier
valueFromString(java.lang.String stringValue)
static KeyModifier
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static KeyModifier[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTROL
public static final KeyModifier CONTROL
-
SHIFT
public static final KeyModifier SHIFT
-
ALT
public static final KeyModifier ALT
-
NONE
public static final KeyModifier NONE
-
-
Field Detail
-
MODIFIER_VALUES
public static final KeyModifier[] MODIFIER_VALUES
-
-
Method Detail
-
values
public static KeyModifier[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (KeyModifier c : KeyModifier.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyModifier valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getActiveModifier
public static KeyModifier getActiveModifier()
-
isKeyCodeModifier
public static boolean isKeyCodeModifier(InputMappings.Input key)
-
valueFromString
public static KeyModifier valueFromString(java.lang.String stringValue)
-
matches
public abstract boolean matches(InputMappings.Input key)
-
isActive
public abstract boolean isActive(@Nullable IKeyConflictContext conflictContext)
-
getCombinedName
public abstract ITextComponent getCombinedName(InputMappings.Input key, java.util.function.Supplier<ITextComponent> defaultLogic)
-
-