类 Codecs
- java.lang.Object
-
- net.minecraft.util.dynamic.Codecs
-
public class Codecs extends Object
A few extensions forCodecorDynamicOps.Expect its removal once Mojang updates DataFixerUpper.
- Mappings:
Namespace Name official aghintermediary net/minecraft/class_5699named net/minecraft/util/dynamic/Codecs
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 (专用程序包) static classCodecs.Xor<F,S>
-
构造器概要
构造器 构造器 说明 Codecs()
-
-
-
方法详细资料
-
xor
public static <F,S> com.mojang.serialization.Codec<com.mojang.datafixers.util.Either<F,S>> xor(com.mojang.serialization.Codec<F> first, com.mojang.serialization.Codec<S> second)Returns an exclusive-or codec forEitherinstances.This returned codec fails if both the
firstandsecondcodecs can decode the input, while DFU'sEitherCodecwill always take the first decoded result when it is available.Otherwise, this behaves the same as the either codec.
- 类型参数:
F- the first typeS- the second type- 参数:
first- the first codecsecond- the second codec- 返回:
- the xor codec for the two codecs
- 另请参阅:
Codec.either(Codec, Codec),EitherCodec- Mappings:
Namespace Name Mixin selector official aLagh;a(Lcom/mojang/serialization/Codec;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_33817Lnet/minecraft/class_5699;method_33817(Lcom/mojang/serialization/Codec;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;named xorLnet/minecraft/util/dynamic/Codecs;xor(Lcom/mojang/serialization/Codec;Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
-