Interface TagKey<T>
- Type Parameters:
T- the type of the members
public sealed interface TagKey<T>
A tag bound to the registry its members belong to.
It is not a Key: use key() to get the plain key of the tag, without the leading
#. Two tag keys are equal when they have the same registry and the same key, and a tag
key never equals a TypedKey, even one with the same namespace and value.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionkey()Returns the plain key of the tag, without the registry.registry()Returns the registry of the tag.static <T> TagKey<T> withRegistry(RegistryKey<T> registry, String key) Returns a tag of the given registry.static <T> TagKey<T> withRegistry(RegistryKey<T> registry, Key key) Returns a tag of the given registry.
-
Method Details
-
withRegistry
Returns a tag of the given registry.- Type Parameters:
T- the type of the members- Parameters:
registry- the registrykey- the key of the tag- Returns:
- a tag of the given registry
- Since:
- 0.1.0
-
withRegistry
Returns a tag of the given registry.- Type Parameters:
T- the type of the members- Parameters:
registry- the registrykey- the key of the tag, for instanceminecraft:logs- Returns:
- a tag of the given registry
- Since:
- 0.1.0
-
registry
RegistryKey<T> registry()Returns the registry of the tag.- Returns:
- the registry of the tag
- Since:
- 0.1.0
-
key
Key key()Returns the plain key of the tag, without the registry.- Returns:
- the plain key of the tag, without the registry
- Since:
- 0.1.0
-