Package net.minecraft.util.dynamic
Class Codecs
java.lang.Object
net.minecraft.util.dynamic.Codecs
public class Codecs extends Object
A few extensions for
Codec
or DynamicOps
.
Expect its removal once Mojang updates DataFixerUpper.
- Mappings:
Namespace Name official afq
intermediary net/minecraft/class_5699
named net/minecraft/util/dynamic/Codecs
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<DoubleStream>
DOUBLE_STREAM
A codec for double streams. -
Constructor Summary
Constructors Constructor Description Codecs()
-
Method Summary
Modifier and Type Method Description static <T> T
createDoubleList(com.mojang.serialization.DynamicOps<T> ops, DoubleStream input)
Encodes a double stream to data of typeT
.static <T> com.mojang.serialization.DataResult<DoubleStream>
getDoubleStream(com.mojang.serialization.DynamicOps<T> ops, T input)
Decodes a double stream frominput
.
-
Field Details
-
DOUBLE_STREAM
A codec for double streams.- See Also:
Codec.INT_STREAM
- Mappings:
Namespace Name Mixin selector official a
Lafq;a:Lcom/mojang/serialization/Codec;
intermediary field_28095
Lnet/minecraft/class_5699;field_28095:Lcom/mojang/serialization/Codec;
named DOUBLE_STREAM
Lnet/minecraft/util/dynamic/Codecs;DOUBLE_STREAM:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Codecs
public Codecs()
-
-
Method Details
-
getDoubleStream
public static <T> com.mojang.serialization.DataResult<DoubleStream> getDoubleStream(com.mojang.serialization.DynamicOps<T> ops, T input)Decodes a double stream frominput
.- Type Parameters:
T
- the input data type- See Also:
DynamicOps.getIntStream(Object)
- Mappings:
Namespace Name Mixin selector official a
Lafq;a(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
intermediary method_32848
Lnet/minecraft/class_5699;method_32848(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
named getDoubleStream
Lnet/minecraft/util/dynamic/Codecs;getDoubleStream(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;
-
createDoubleList
public static <T> T createDoubleList(com.mojang.serialization.DynamicOps<T> ops, DoubleStream input)Encodes a double stream to data of typeT
.- Type Parameters:
T
- the output data type- See Also:
DynamicOps.createIntList(java.util.stream.IntStream)
- Mappings:
Namespace Name Mixin selector official a
Lafq;a(Lcom/mojang/serialization/DynamicOps;Ljava/util/stream/DoubleStream;)Ljava/lang/Object;
intermediary method_32850
Lnet/minecraft/class_5699;method_32850(Lcom/mojang/serialization/DynamicOps;Ljava/util/stream/DoubleStream;)Ljava/lang/Object;
named createDoubleList
Lnet/minecraft/util/dynamic/Codecs;createDoubleList(Lcom/mojang/serialization/DynamicOps;Ljava/util/stream/DoubleStream;)Ljava/lang/Object;
-