Interface KeySet<T>
- Type Parameters:
T- the type of the entries
A set of registry entries, either a tag or an explicit list of keys, as data packs declare it.
Resolving a tag requires the server registries: use Enchantments.isSupportedItem(TypedKey, TypedKey)
or Enchantments.areCompatible(TypedKey, TypedKey) to test membership.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisEmpty()Returnstrueif this set neither refers to a tag nor lists any key.default booleanisTag()Returnstrueif this set refers to a tag.keys()Returns the explicitly listed keys, empty for a tag.tag()Returns the tag this set refers to, such asminecraft:enchantable/weapon, or empty for an explicit list.
-
Method Details
-
tag
-
keys
-
isTag
default boolean isTag()Returnstrueif this set refers to a tag.- Returns:
trueif this set refers to a tag- Since:
- 0.1.0
-
isEmpty
default boolean isEmpty()Returnstrueif this set neither refers to a tag nor lists any key.- Returns:
trueif this set neither refers to a tag nor lists any key- Since:
- 0.1.0
-