Package net.minecraft.resources
Class ResourceKey<T>
java.lang.Object
net.minecraft.resources.ResourceKey<T>
- All Implemented Interfaces:
Comparable<ResourceKey<?>>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
private final ResourceLocation
private static final ConcurrentMap
<ResourceKey.InternKey, ResourceKey<?>> -
Constructor Summary
ModifierConstructorDescriptionprivate
ResourceKey
(ResourceLocation p_135780_, ResourceLocation p_135781_) -
Method Summary
Modifier and TypeMethodDescription<E> Optional
<ResourceKey<E>> cast
(ResourceKey<? extends Registry<E>> p_195976_) static <T> com.mojang.serialization.Codec
<ResourceKey<T>> codec
(ResourceKey<? extends Registry<T>> p_195967_) int
compareTo
(ResourceKey<?> resourceKey) static <T> ResourceKey
<T> create
(ResourceKey<? extends Registry<T>> p_135786_, ResourceLocation p_135787_) private static <T> ResourceKey
<T> create
(ResourceLocation p_135791_, ResourceLocation p_135792_) static <T> ResourceKey
<Registry<T>> createRegistryKey
(ResourceLocation p_135789_) boolean
boolean
isFor
(ResourceKey<? extends Registry<?>> p_135784_) location()
registry()
static <T> StreamCodec
<io.netty.buffer.ByteBuf, ResourceKey<T>> streamCodec
(ResourceKey<? extends Registry<T>> p_335484_) toString()
-
Field Details
-
VALUES
-
registryName
-
location
-
-
Constructor Details
-
ResourceKey
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<ResourceKey<T>> codec(ResourceKey<? extends Registry<T>> p_195967_) -
streamCodec
public static <T> StreamCodec<io.netty.buffer.ByteBuf,ResourceKey<T>> streamCodec(ResourceKey<? extends Registry<T>> p_335484_) -
create
public static <T> ResourceKey<T> create(ResourceKey<? extends Registry<T>> p_135786_, ResourceLocation p_135787_) -
createRegistryKey
-
create
-
toString
-
isFor
-
cast
-
location
-
registry
-
registryKey
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-