Class ConditionalOps.ConditionalDecoder<A>
java.lang.Object
net.neoforged.neoforge.common.conditions.ConditionalOps.ConditionalDecoder<A>
- All Implemented Interfaces:
com.mojang.serialization.Decoder<Optional<WithConditions<A>>>
- Enclosing class:
ConditionalOps<T>
private static final class ConditionalOps.ConditionalDecoder<A>
extends Object
implements com.mojang.serialization.Decoder<Optional<WithConditions<A>>>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.mojang.serialization.Decoder
com.mojang.serialization.Decoder.Boxed<A>, com.mojang.serialization.Decoder.Simple<A>, com.mojang.serialization.Decoder.Terminal<A>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
final com.mojang.serialization.Codec
<List<ICondition>> private final com.mojang.serialization.Codec
<ICondition.IContext> private final com.mojang.serialization.Decoder
<A> -
Constructor Summary
ModifierConstructorDescriptionprivate
ConditionalDecoder
(String conditionalsPropertyKey, com.mojang.serialization.Codec<List<ICondition>> conditionsCodec, com.mojang.serialization.Codec<ICondition.IContext> contextCodec, com.mojang.serialization.Decoder<A> innerCodec) -
Method Summary
Modifier and TypeMethodDescription<T> com.mojang.serialization.DataResult
<com.mojang.datafixers.util.Pair<Optional<WithConditions<A>>, T>> decode
(com.mojang.serialization.DynamicOps<T> ops, T input) 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.Decoder
boxed, decode, fieldOf, flatMap, map, parse, parse, promotePartial, simple, terminal, withLifecycle
-
Field Details
-
conditionalsPropertyKey
-
conditionsCodec
-
contextCodec
-
innerCodec
-
-
Constructor Details
-
ConditionalDecoder
private ConditionalDecoder(String conditionalsPropertyKey, com.mojang.serialization.Codec<List<ICondition>> conditionsCodec, com.mojang.serialization.Codec<ICondition.IContext> contextCodec, com.mojang.serialization.Decoder<A> innerCodec)
-
-
Method Details
-
decode
public <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Optional<WithConditions<A>>,T>> decode(com.mojang.serialization.DynamicOps<T> ops, T input) - Specified by:
decode
in interfacecom.mojang.serialization.Decoder<A>
-