Package net.minecraft.util.dynamic
Class RegistryReadingOps<T>
java.lang.Object
net.minecraft.util.dynamic.ForwardingDynamicOps<T>
net.minecraft.util.dynamic.RegistryReadingOps<T>
- All Implemented Interfaces:
com.mojang.serialization.DynamicOps<T>
A dynamic ops that encode an id for a registry element rather than a full object.
- See Also:
-
Encoder.encode(Object, DynamicOps, Object)
- Mappings:
Namespace Name official yf
intermediary net/minecraft/class_5384
named net/minecraft/util/dynamic/RegistryReadingOps
-
Field Summary
Fields inherited from class net.minecraft.util.dynamic.ForwardingDynamicOps
delegate
-
Constructor Summary
ModifierConstructorDescriptionprivate
RegistryReadingOps
(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker) -
Method Summary
Modifier and TypeMethodDescriptionprotected <E> com.mojang.serialization.DataResult<T>
encodeOrId
(E input, T prefix, RegistryKey<? extends Registry<E>> registryReference, com.mojang.serialization.Codec<E> codec) Encode an id for a registry element than a full object if possible.static <T> RegistryReadingOps<T>
of
(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker) 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
-
manager
- Mappings:
Namespace Name Mixin selector official b
Lyf;b:Lgy;
intermediary field_25514
Lnet/minecraft/class_5384;field_25514:Lnet/minecraft/class_5455;
named manager
Lnet/minecraft/util/dynamic/RegistryReadingOps;manager:Lnet/minecraft/util/registry/DynamicRegistryManager;
-
-
Constructor Details
-
RegistryReadingOps
private RegistryReadingOps(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker) - Mappings:
Namespace Name Mixin selector official <init>
Lyf;<init>(Lcom/mojang/serialization/DynamicOps;Lgy;)V
intermediary <init>
Lnet/minecraft/class_5384;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5455;)V
named <init>
Lnet/minecraft/util/dynamic/RegistryReadingOps;<init>(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/registry/DynamicRegistryManager;)V
-
-
Method Details
-
of
public static <T> RegistryReadingOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker) - Mappings:
Namespace Name Mixin selector official a
Lyf;a(Lcom/mojang/serialization/DynamicOps;Lgy;)Lyf;
intermediary method_29771
Lnet/minecraft/class_5384;method_29771(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_5455;)Lnet/minecraft/class_5384;
named of
Lnet/minecraft/util/dynamic/RegistryReadingOps;of(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/registry/DynamicRegistryManager;)Lnet/minecraft/util/dynamic/RegistryReadingOps;
-
encodeOrId
protected <E> com.mojang.serialization.DataResult<T> encodeOrId(E input, T prefix, RegistryKey<? extends Registry<E>> registryReference, com.mojang.serialization.Codec<E> codec) 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
Lyf;a(Ljava/lang/Object;Ljava/lang/Object;Lyg;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
intermediary method_29772
Lnet/minecraft/class_5384;method_29772(Ljava/lang/Object;Ljava/lang/Object;Lnet/minecraft/class_5321;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
named encodeOrId
Lnet/minecraft/util/dynamic/RegistryReadingOps;encodeOrId(Ljava/lang/Object;Ljava/lang/Object;Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/DataResult;
-