public class RegistryReadingOps<T> extends ForwardingDynamicOps<T>
Encoder.encode(Object, DynamicOps, Object)
Modifier and Type | Field and Description |
---|---|
private DynamicRegistryManager |
manager |
delegate
Modifier | Constructor and Description |
---|---|
private |
RegistryReadingOps(com.mojang.serialization.DynamicOps<T> delegate,
DynamicRegistryManager tracker) |
Modifier and Type | Method and Description |
---|---|
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.
|
static <T> RegistryReadingOps<T> |
of(com.mojang.serialization.DynamicOps<T> delegate,
DynamicRegistryManager tracker) |
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
private final DynamicRegistryManager manager
private RegistryReadingOps(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker)
public static <T> RegistryReadingOps<T> of(com.mojang.serialization.DynamicOps<T> delegate, DynamicRegistryManager tracker)
protected <E> com.mojang.serialization.DataResult<T> encodeOrId(E input, T prefix, RegistryKey<? extends Registry<E>> registryReference, com.mojang.serialization.Codec<E> codec)
This method is called by casting an arbitrary dynamic ops to a registry reading ops.
RegistryOps#decodeOrId(Object, RegistryKey, MapCodec)