Package net.minecraft.util.dynamic
Class RegistryOps<T>
java.lang.Object
net.minecraft.util.dynamic.ForwardingDynamicOps<T>
net.minecraft.util.dynamic.RegistryOps<T>
- All Implemented Interfaces:
com.mojang.serialization.DynamicOps<T>
- Mappings:
Namespace Name official wt
intermediary net/minecraft/class_5382
named net/minecraft/util/dynamic/RegistryOps
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
private static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RegistryOps.EntryLoader
private final RegistryOps<JsonElement>
private static final String
(package private) static final Logger
private final DynamicRegistryManager
private final Map<RegistryKey<? extends Registry<?>>,
RegistryOps.ValueHolder<?>> Fields inherited from class net.minecraft.util.dynamic.ForwardingDynamicOps
delegate
-
Constructor Summary
ModifierConstructorDescriptionprivate
RegistryOps
(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager registryManager, IdentityHashMap<RegistryKey<? extends Registry<?>>, RegistryOps.ValueHolder<?>> valueHolders) -
Method Summary
Modifier and TypeMethodDescriptiondecodeOrId
(T t, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec, boolean allowInlineDefinitions) Encode an id for a registry element than a full object if possible.protected <E> com.mojang.serialization.DataResult<Registry<E>>
getRegistry
(RegistryKey<? extends Registry<E>> key) private <E> RegistryOps.ValueHolder<E>
getValueHolder
(RegistryKey<? extends Registry<E>> registryRef) <E> com.mojang.serialization.DataResult<SimpleRegistry<E>>
loadToRegistry
(SimpleRegistry<E> registry, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec) Loads elements into a registry just loaded from a decoder.static <T> RegistryOps<T>
method_36574
(com.mojang.serialization.DynamicOps<T> dynamicOps, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager) static <T> RegistryOps<T>
method_36575
(com.mojang.serialization.DynamicOps<T> dynamicOps, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager) static <T> RegistryOps<T>
of
(com.mojang.serialization.DynamicOps<T> delegate, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager) static <T> RegistryOps<T>
of
(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager) private <E> com.mojang.serialization.DataResult<Supplier<E>>
readSupplier
(RegistryKey<? extends Registry<E>> key, MutableRegistry<E> registry, com.mojang.serialization.Codec<E> codec, Identifier elementId) Reads a supplier for a registry element.Methods inherited from class net.minecraft.util.dynamic.ForwardingDynamicOps
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
-
LOGGER
- Mappings:
Namespace Name Mixin selector official b
Lwt;b:Lorg/apache/logging/log4j/Logger;
intermediary field_25509
Lnet/minecraft/class_5382;field_25509:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/util/dynamic/RegistryOps;LOGGER:Lorg/apache/logging/log4j/Logger;
-
JSON_FILE_EXTENSION
- See Also:
- Mappings:
Namespace Name Mixin selector official c
Lwt;c:Ljava/lang/String;
intermediary field_33379
Lnet/minecraft/class_5382;field_33379:Ljava/lang/String;
named JSON_FILE_EXTENSION
Lnet/minecraft/util/dynamic/RegistryOps;JSON_FILE_EXTENSION:Ljava/lang/String;
-
entryLoader
- Mappings:
Namespace Name Mixin selector official d
Lwt;d:Lwt$b;
intermediary field_26738
Lnet/minecraft/class_5382;field_26738:Lnet/minecraft/class_5382$class_5506;
named entryLoader
Lnet/minecraft/util/dynamic/RegistryOps;entryLoader:Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;
-
registryManager
- Mappings:
Namespace Name Mixin selector official e
Lwt;e:Lgx;
intermediary field_25511
Lnet/minecraft/class_5382;field_25511:Lnet/minecraft/class_5455;
named registryManager
Lnet/minecraft/util/dynamic/RegistryOps;registryManager:Lnet/minecraft/util/registry/DynamicRegistryManager;
-
valueHolders
- Mappings:
Namespace Name Mixin selector official f
Lwt;f:Ljava/util/Map;
intermediary field_25512
Lnet/minecraft/class_5382;field_25512:Ljava/util/Map;
named valueHolders
Lnet/minecraft/util/dynamic/RegistryOps;valueHolders:Ljava/util/Map;
-
entryOps
- Mappings:
Namespace Name Mixin selector official g
Lwt;g:Lwt;
intermediary field_26739
Lnet/minecraft/class_5382;field_26739:Lnet/minecraft/class_5382;
named entryOps
Lnet/minecraft/util/dynamic/RegistryOps;entryOps:Lnet/minecraft/util/dynamic/RegistryOps;
-
-
Constructor Details
-
RegistryOps
private RegistryOps(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager registryManager, IdentityHashMap<RegistryKey<? extends Registry<?>>, RegistryOps.ValueHolder<?>> valueHolders) - Mappings:
Namespace Name Mixin selector official <init>
Lwt;<init>(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;Ljava/util/IdentityHashMap;)V
intermediary <init>
Lnet/minecraft/class_5382;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;Ljava/util/IdentityHashMap;)V
named <init>
Lnet/minecraft/util/dynamic/RegistryOps;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;Ljava/util/IdentityHashMap;)V
-
-
Method Details
-
method_36574
public static <T> RegistryOps<T> method_36574(com.mojang.serialization.DynamicOps<T> dynamicOps, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager) - Mappings:
Namespace Name Mixin selector official a
Lwt;a(Lcom/mojang/serialization/DynamicOps;Ladt;Lgx;)Lwt;
intermediary method_36574
Lnet/minecraft/class_5382;method_36574(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_3300;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
named method_36574
Lnet/minecraft/util/dynamic/RegistryOps;method_36574(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
-
method_36575
public static <T> RegistryOps<T> method_36575(com.mojang.serialization.DynamicOps<T> dynamicOps, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager) - Mappings:
Namespace Name Mixin selector official a
Lwt;a(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;)Lwt;
intermediary method_36575
Lnet/minecraft/class_5382;method_36575(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
named method_36575
Lnet/minecraft/util/dynamic/RegistryOps;method_36575(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
-
of
public static <T> RegistryOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, ResourceManager resourceManager, DynamicRegistryManager dynamicRegistryManager) - Mappings:
Namespace Name Mixin selector official b
Lwt;b(Lcom/mojang/serialization/DynamicOps;Ladt;Lgx;)Lwt;
intermediary method_29753
Lnet/minecraft/class_5382;method_29753(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_3300;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
named of
Lnet/minecraft/util/dynamic/RegistryOps;of(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
-
of
public static <T> RegistryOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, RegistryOps.EntryLoader entryLoader, DynamicRegistryManager dynamicRegistryManager) - Mappings:
Namespace Name Mixin selector official b
Lwt;b(Lcom/mojang/serialization/DynamicOps;Lwt$b;Lgx;)Lwt;
intermediary method_31150
Lnet/minecraft/class_5382;method_31150(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5382$class_5506;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5382;
named of
Lnet/minecraft/util/dynamic/RegistryOps;of(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/dynamic/RegistryOps$EntryLoader;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryOps;
-
decodeOrId
protected <E> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Supplier<E>,T>> decodeOrId(T t, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec, boolean allowInlineDefinitions) Encode an id for a registry element than a full object if possible.This method is called by casting an arbitrary dynamic ops to a registry reading ops.
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lwt;a(Ljava/lang/Object;Lwv;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
intermediary method_29759
Lnet/minecraft/class_5382;method_29759(Ljava/lang/Object;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
named decodeOrId
Lnet/minecraft/util/dynamic/RegistryOps;decodeOrId(Ljava/lang/Object;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;Z)Lcom/mojang/serialization/DataResult;
-
loadToRegistry
public <E> com.mojang.serialization.DataResult<SimpleRegistry<E>> loadToRegistry(SimpleRegistry<E> registry, RegistryKey<? extends Registry<E>> key, com.mojang.serialization.Codec<E> codec) Loads elements into a registry just loaded from a decoder.- Mappings:
Namespace Name Mixin selector official a
Lwt;a(Lgr;Lwv;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
intermediary method_29755
Lnet/minecraft/class_5382;method_29755(Lnet/minecraft/class_2370;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
named loadToRegistry
Lnet/minecraft/util/dynamic/RegistryOps;loadToRegistry(Lnet/minecraft/util/registry/SimpleRegistry;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
-
readSupplier
private <E> com.mojang.serialization.DataResult<Supplier<E>> readSupplier(RegistryKey<? extends Registry<E>> key, MutableRegistry<E> registry, com.mojang.serialization.Codec<E> codec, Identifier elementId) Reads a supplier for a registry element.This logic is used by both
decodeOrId
andloadToRegistry
.- Mappings:
Namespace Name Mixin selector official a
Lwt;a(Lwv;Lhc;Lcom/mojang/serialization/Codec;Lww;)Lcom/mojang/serialization/DataResult;
intermediary method_29763
Lnet/minecraft/class_5382;method_29763(Lnet/minecraft/class_5321;Lnet/minecraft/class_2385;Lcom/mojang/serialization/Codec;Lnet/minecraft/class_2960;)Lcom/mojang/serialization/DataResult;
named readSupplier
Lnet/minecraft/util/dynamic/RegistryOps;readSupplier(Lnet/minecraft/util/registry/RegistryKey;Lnet/minecraft/util/registry/MutableRegistry;Lcom/mojang/serialization/Codec;Lnet/minecraft/util/Identifier;)Lcom/mojang/serialization/DataResult;
-
getValueHolder
private <E> RegistryOps.ValueHolder<E> getValueHolder(RegistryKey<? extends Registry<E>> registryRef) - Mappings:
Namespace Name Mixin selector official b
Lwt;b(Lwv;)Lwt$a;
intermediary method_29761
Lnet/minecraft/class_5382;method_29761(Lnet/minecraft/class_5321;)Lnet/minecraft/class_5382$class_5383;
named getValueHolder
Lnet/minecraft/util/dynamic/RegistryOps;getValueHolder(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/dynamic/RegistryOps$ValueHolder;
-
getRegistry
protected <E> com.mojang.serialization.DataResult<Registry<E>> getRegistry(RegistryKey<? extends Registry<E>> key) - Mappings:
Namespace Name Mixin selector official a
Lwt;a(Lwv;)Lcom/mojang/serialization/DataResult;
intermediary method_31152
Lnet/minecraft/class_5382;method_31152(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/DataResult;
named getRegistry
Lnet/minecraft/util/dynamic/RegistryOps;getRegistry(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/DataResult;
-