Class ResourceKey<T>

java.lang.Object
net.minecraft.resources.ResourceKey<T>
Type Parameters:
T - The type of the resource represented by this ResourceKey, or the type of the registry if it is a registry key.
All Implemented Interfaces:
Comparable<ResourceKey<?>>

public class ResourceKey<T> extends Object implements Comparable<ResourceKey<?>>
An immutable key for a resource, in terms of the name of its parent registry and its location in that registry.

Registry uses this to return resource keys for registry objects via Registry.getResourceKey(Object). It also uses this class to store its name, with the parent registry name set to minecraft:root. When used in this way it is usually referred to as a "registry key".

See Also: