Package net.minecraft.util
Class RegistryKey<T>
- java.lang.Object
-
- net.minecraft.util.RegistryKey<T>
-
- All Implemented Interfaces:
java.lang.Comparable<RegistryKey<?>>
public class RegistryKey<T> extends java.lang.Object implements java.lang.Comparable<RegistryKey<?>>
-
-
Field Summary
Fields Modifier and Type Field Description private ResourceLocation
location
private ResourceLocation
registryName
private static java.util.Map<java.lang.String,RegistryKey<?>>
VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
RegistryKey(ResourceLocation p_i232592_1_, ResourceLocation p_i232592_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(RegistryKey<?> o)
static <T> RegistryKey<T>
create(RegistryKey<? extends Registry<T>> p_240903_0_, ResourceLocation p_240903_1_)
private static <T> RegistryKey<T>
create(ResourceLocation p_240905_0_, ResourceLocation p_240905_1_)
static <T> RegistryKey<Registry<T>>
createRegistryKey(ResourceLocation p_240904_0_)
static <T> java.util.function.Function<ResourceLocation,RegistryKey<T>>
elementKey(RegistryKey<? extends Registry<T>> p_240902_0_)
ResourceLocation
getRegistryName()
boolean
isFor(RegistryKey<? extends Registry<?>> p_244356_1_)
ResourceLocation
location()
java.lang.String
toString()
-
-
-
Field Detail
-
VALUES
private static final java.util.Map<java.lang.String,RegistryKey<?>> VALUES
-
registryName
private final ResourceLocation registryName
-
location
private final ResourceLocation location
-
-
Constructor Detail
-
RegistryKey
private RegistryKey(ResourceLocation p_i232592_1_, ResourceLocation p_i232592_2_)
-
-
Method Detail
-
create
public static <T> RegistryKey<T> create(RegistryKey<? extends Registry<T>> p_240903_0_, ResourceLocation p_240903_1_)
-
createRegistryKey
public static <T> RegistryKey<Registry<T>> createRegistryKey(ResourceLocation p_240904_0_)
-
create
private static <T> RegistryKey<T> create(ResourceLocation p_240905_0_, ResourceLocation p_240905_1_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isFor
public boolean isFor(RegistryKey<? extends Registry<?>> p_244356_1_)
-
location
public ResourceLocation location()
-
elementKey
public static <T> java.util.function.Function<ResourceLocation,RegistryKey<T>> elementKey(RegistryKey<? extends Registry<T>> p_240902_0_)
-
getRegistryName
public ResourceLocation getRegistryName()
-
compareTo
public int compareTo(RegistryKey<?> o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<T>
-
-