Interface TagKey<T>
- All Superinterfaces:
Keyed
-
Method Summary
Modifier and TypeMethodDescriptioncodec(Registries.Selector<T> selector) default Stringstatic <T> NetworkBuffer.Type<TagKey<T>> networkType(Registries.Selector<T> selector) static <T> TagKey<T> Creates a tag key from an unhashed string.static <T> TagKey<T> Creates a tag key from an unhashed key without checking that the tag exists.static <T> TagKey<T>
-
Method Details
-
codec
-
networkType
-
ofHash
-
of
Creates a tag key from an unhashed string. The key syntax is validated, tag existence is not. A tag key is only a typed name. Looking up a tag that does not exist returnsnull.- Type Parameters:
T- the registry entry type- Parameters:
key- the tag key without a leading#- Returns:
- the tag key
- Throws:
IllegalArgumentException- ifkeyis invalidNullPointerException- ifkeyisnull
-
of
Creates a tag key from an unhashed key without checking that the tag exists. Seeof(String).- Type Parameters:
T- the registry entry type- Parameters:
key- the tag key- Returns:
- the tag key
- Throws:
NullPointerException- ifkeyisnull
-
hashedKey
-