Interface TypedKey<T>
- Type Parameters:
T- the value type for the registry
- All Superinterfaces:
Comparable<Key>, Key, Keyed, Namespaced
Represents a key for a value in a specific registry.
-
Field Summary
Fields inherited from interface Key
DEFAULT_SEPARATOR, MINECRAFT_NAMESPACE -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TypedKey<T> create(RegistryKey<T> registryKey, String key) Create a typed key from a string and a registry key.static <T> TypedKey<T> create(RegistryKey<T> registryKey, Key key) Create a typed key from a key and a registry key.key()Gets the key for the value in the registry.Gets the registry key for the value this key represents.
-
Method Details
-
key
-
registryKey
RegistryKey<T> registryKey()Gets the registry key for the value this key represents.- Returns:
- the registry key
-
create
Create a typed key from a key and a registry key.- Type Parameters:
T- value type- Parameters:
registryKey- the registry this key is forkey- the key for the value in the registry- Returns:
- a new key for the value key and registry key
-
create
Create a typed key from a string and a registry key.- Type Parameters:
T- value type- Parameters:
registryKey- the registry this key is forkey- the string version of aKeythat will be passed toKey.key(String)for parsing.- Returns:
- a new key for the value key and registry key
- See Also:
-