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

    Fields
    Modifier and Type
    Field
    Description
    private 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

    Constructors
    Modifier
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    <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

      private final String conditionalsPropertyKey
    • conditionsCodec

      public final com.mojang.serialization.Codec<List<ICondition>> conditionsCodec
    • contextCodec

      private final com.mojang.serialization.Codec<ICondition.IContext> contextCodec
    • innerCodec

      private final com.mojang.serialization.Decoder<A> 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 interface com.mojang.serialization.Decoder<A>