Interface RegistryKeySet<T extends Keyed>
- Type Parameters:
T- registry value type
- All Superinterfaces:
Iterable<TypedKey<T>>, RegistrySet<T>
- All Known Subinterfaces:
Tag<T>
@NonExtendable
public non-sealed interface RegistryKeySet<T extends Keyed>
extends Iterable<TypedKey<T>>, RegistrySet<T>
Represents a collection tied to a registry.
There are 2 types of registry key sets:
Tagwhich is a tag from vanilla or a datapack. These are obtained viaRegistry.getTag(io.papermc.paper.registry.tag.TagKey).RegistryKeySetwhich is a set of keys linked to values that are present in the registry. These are created viaRegistrySet.keySet(RegistryKey, Iterable)orRegistrySet.keySetFromValues(RegistryKey, Iterable).
-
Method Summary
Methods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface RegistrySet
isEmpty, registryKey
-
Method Details
-
size
default int size()Description copied from interface:RegistrySetGet the size of this set.- Specified by:
sizein interfaceRegistrySet<T extends Keyed>- Returns:
- the size
-
values
@Unmodifiable Collection<TypedKey<T>> values()Get the keys for the values in this set.- Returns:
- the keys
-
resolve
Resolve this set into a collection of values. Prefer usingvalues().- Parameters:
registry- the registry to resolve the values from (must matchRegistrySet.registryKey())- Returns:
- the resolved values
- See Also:
-
contains
-
iterator
-