Class ConditionalOps.ConditionalEncoder<A>

java.lang.Object
net.neoforged.neoforge.common.conditions.ConditionalOps.ConditionalEncoder<A>
All Implemented Interfaces:
com.mojang.serialization.Encoder<Optional<WithConditions<A>>>
Enclosing class:
ConditionalOps<T>

private static final class ConditionalOps.ConditionalEncoder<A> extends Object implements com.mojang.serialization.Encoder<Optional<WithConditions<A>>>
  • Field Details

    • conditionalsPropertyKey

      private final String conditionalsPropertyKey
    • conditionsCodec

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

      private final com.mojang.serialization.Encoder<A> innerCodec
  • Constructor Details

    • ConditionalEncoder

      private ConditionalEncoder(String conditionalsPropertyKey, com.mojang.serialization.Codec<List<ICondition>> conditionsCodec, com.mojang.serialization.Encoder<A> innerCodec)
  • Method Details

    • encode

      public <T> com.mojang.serialization.DataResult<T> encode(Optional<WithConditions<A>> input, com.mojang.serialization.DynamicOps<T> ops, T prefix)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<A>
    • toString

      public String toString()
      Overrides:
      toString in class Object