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 TypeClassDescriptionstatic final record
static interface
Nested classes/interfaces inherited from class net.minecraft.resources.DelegatingOps
DelegatingOps.Builder<R extends DelegatingOps<?>>
-
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_) RegistryOps
(RegistryOps<T> parent) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> DelegatingOps.Builder<RegistryOps<T>>
builder
(com.mojang.serialization.DynamicOps<T> parent, RegistryOps.RegistryInfoLookup lookup) static <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_) <E> Optional<HolderGetter<E>>
getter
(ResourceKey<? extends Registry<? extends E>> p_256031_) private static RegistryOps.RegistryInfoLookup
memoizeLookup
(RegistryOps.RegistryInfoLookup p_255769_) <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) Methods inherited from class net.minecraft.resources.DelegatingOps
builder, compressMaps, convertTo, createBoolean, createByte, createByteList, createDouble, createFloat, createInt, createIntList, createList, createLong, createLongList, createMap, createNumeric, createShort, createString, empty, getBooleanValue, getByteBuffer, getContext, getIntStream, getList, getLongStream, getMap, getMapEntries, getMapValues, getNumberValue, getStream, getStringValue, listBuilder, mapBuilder, mergeToList, mergeToList, mergeToMap, mergeToMap, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mojang.serialization.DynamicOps
convertList, convertMap, createMap, emptyList, emptyMap, get, getGeneric, getNumberValue, mergeToMap, mergeToPrimitive, 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_) -
RegistryOps
-
-
Method Details
-
memoizeLookup
private static RegistryOps.RegistryInfoLookup memoizeLookup(RegistryOps.RegistryInfoLookup p_255769_) -
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_) -
builder
public static <T> DelegatingOps.Builder<RegistryOps<T>> builder(com.mojang.serialization.DynamicOps<T> parent, RegistryOps.RegistryInfoLookup lookup) -
owner
-
getter
-
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_)
-