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<?> o) 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
isFor
(ResourceKey<? extends Registry<?>> p_135784_) location()
registry()
static <T> StreamCodec
<io.netty.buffer.ByteBuf, ResourceKey<T>> streamCodec
(ResourceKey<? extends Registry<T>> p_320330_) 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_320330_) -
create
public static <T> ResourceKey<T> create(ResourceKey<? extends Registry<T>> p_135786_, ResourceLocation p_135787_) -
createRegistryKey
-
create
-
toString
-
isFor
-
cast
-
location
-
registry
-
registryKey
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T>
-