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>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.mojang.serialization.DynamicOps<com.google.gson.JsonElement>
private final Optional<RegistryLoader.Bound>
private final RegistryAccess
Fields inherited from class net.minecraft.resources.DelegatingOps
delegate
-
Constructor Summary
ModifierConstructorDescriptionprivate
RegistryOps
(com.mojang.serialization.DynamicOps<T> p_206809_, RegistryAccess p_206810_, Optional<RegistryLoader.Bound> p_206811_) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> RegistryOps<T>
create
(com.mojang.serialization.DynamicOps<T> p_206822_, RegistryAccess p_206823_) static <T> RegistryOps<T>
createAndLoad
(com.mojang.serialization.DynamicOps<T> p_206818_, RegistryAccess.Writable p_206819_, RegistryResourceAccess p_206820_) static <T> RegistryOps<T>
createAndLoad
(com.mojang.serialization.DynamicOps<T> p_206814_, RegistryAccess.Writable p_206815_, ResourceManager p_206816_) com.mojang.serialization.DynamicOps<com.google.gson.JsonElement>
registry
(ResourceKey<? extends Registry<? extends E>> p_206827_) static <E> com.mojang.serialization.MapCodec<Registry<E>>
retrieveRegistry
(ResourceKey<? extends Registry<? extends E>> p_206833_) Methods inherited from class net.minecraft.resources.DelegatingOps
compressMaps, convertTo, createBoolean, createByte, createByteList, createDouble, createFloat, createInt, createIntList, createList, createLong, createLongList, createMap, createNumeric, createShort, createString, empty, getBooleanValue, getByteBuffer, 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
-
loader
-
registryAccess
-
asJson
private final com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> asJson
-
-
Constructor Details
-
RegistryOps
private RegistryOps(com.mojang.serialization.DynamicOps<T> p_206809_, RegistryAccess p_206810_, Optional<RegistryLoader.Bound> p_206811_)
-
-
Method Details
-
create
public static <T> RegistryOps<T> create(com.mojang.serialization.DynamicOps<T> p_206822_, RegistryAccess p_206823_) -
createAndLoad
public static <T> RegistryOps<T> createAndLoad(com.mojang.serialization.DynamicOps<T> p_206814_, RegistryAccess.Writable p_206815_, ResourceManager p_206816_) -
createAndLoad
public static <T> RegistryOps<T> createAndLoad(com.mojang.serialization.DynamicOps<T> p_206818_, RegistryAccess.Writable p_206819_, RegistryResourceAccess p_206820_) -
registry
public <E> Optional<? extends Registry<E>> registry(ResourceKey<? extends Registry<? extends E>> p_206827_) -
registryLoader
-
getAsJson
public com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> getAsJson() -
retrieveRegistry
public static <E> com.mojang.serialization.MapCodec<Registry<E>> retrieveRegistry(ResourceKey<? extends Registry<? extends E>> p_206833_)
-