Package net.minecraft.resources
Class RegistryOps<T>
java.lang.Object
net.minecraft.resources.DelegatingOps<T>
net.minecraft.resources.RegistryOps<T>
- All Implemented Interfaces:
com.mojang.serialization.DynamicOps<T>
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final class
static final record
static interface
-
Field Summary
Fields inherited from class net.minecraft.resources.DelegatingOps
ctx, delegate
-
Constructor Summary
ModifierConstructorDescriptionprivate
RegistryOps
(com.mojang.serialization.DynamicOps<T> p_256313_, RegistryOps.RegistryInfoLookup p_255799_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RegistryOps
<T> create
(com.mojang.serialization.DynamicOps<T> p_256342_, HolderLookup.Provider p_255950_) static <T> RegistryOps
<T> create
(com.mojang.serialization.DynamicOps<T> p_256278_, RegistryOps.RegistryInfoLookup p_256479_) boolean
<E> Optional
<HolderGetter<E>> getter
(ResourceKey<? extends Registry<? extends E>> p_256031_) int
hashCode()
static <T> com.mojang.serialization.Dynamic
<T> injectRegistryContext
(com.mojang.serialization.Dynamic<T> p_331489_, HolderLookup.Provider p_331408_) <E> Optional
<HolderOwner<E>> owner
(ResourceKey<? extends Registry<? extends E>> p_255757_) static <E,
O> com.mojang.serialization.codecs.RecordCodecBuilder <O, Holder.Reference<E>> retrieveElement
(ResourceKey<E> p_256347_) static <E,
O> com.mojang.serialization.codecs.RecordCodecBuilder <O, HolderGetter<E>> retrieveGetter
(ResourceKey<? extends Registry<? extends E>> p_206833_) static <E> com.mojang.serialization.MapCodec
<HolderLookup.RegistryLookup<E>> retrieveRegistryLookup
(ResourceKey<? extends Registry<? extends E>> resourceKey) <U> RegistryOps
<U> withParent
(com.mojang.serialization.DynamicOps<U> p_332969_) Methods inherited from class net.minecraft.resources.DelegatingOps
compressMaps, convertTo, createBoolean, createByte, createByteList, createDouble, createFloat, createInt, createIntList, createList, createLong, createLongList, createMap, createMap, createNumeric, createShort, createString, empty, emptyList, emptyMap, getBooleanValue, getByteBuffer, getContext, getIntStream, getList, getLongStream, getMap, getMapEntries, getMapValues, getNumberValue, getStream, getStringValue, listBuilder, mapBuilder, mergeToList, mergeToList, mergeToMap, mergeToMap, mergeToMap, mergeToPrimitive, remove, withContext
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.serialization.DynamicOps
convertList, convertMap, get, getGeneric, getNumberValue, set, update, updateGeneric, withDecoder, withEncoder, withParser
-
Field Details
-
lookupProvider
-
-
Constructor Details
-
RegistryOps
private RegistryOps(com.mojang.serialization.DynamicOps<T> p_256313_, RegistryOps.RegistryInfoLookup p_255799_)
-
-
Method Details
-
create
public static <T> RegistryOps<T> create(com.mojang.serialization.DynamicOps<T> p_256342_, HolderLookup.Provider p_255950_) -
create
public static <T> RegistryOps<T> create(com.mojang.serialization.DynamicOps<T> p_256278_, RegistryOps.RegistryInfoLookup p_256479_) -
injectRegistryContext
public static <T> com.mojang.serialization.Dynamic<T> injectRegistryContext(com.mojang.serialization.Dynamic<T> p_331489_, HolderLookup.Provider p_331408_) -
withParent
-
owner
-
getter
-
equals
-
hashCode
public int hashCode() -
retrieveGetter
public static <E,O> com.mojang.serialization.codecs.RecordCodecBuilder<O,HolderGetter<E>> retrieveGetter(ResourceKey<? extends Registry<? extends E>> p_206833_) -
retrieveRegistryLookup
public static <E> com.mojang.serialization.MapCodec<HolderLookup.RegistryLookup<E>> retrieveRegistryLookup(ResourceKey<? extends Registry<? extends E>> resourceKey) -
retrieveElement
public static <E,O> com.mojang.serialization.codecs.RecordCodecBuilder<O,Holder.Reference<E>> retrieveElement(ResourceKey<E> p_256347_)
-