Class ExtraCodecs.RecursiveCodec<T>

java.lang.Object
net.minecraft.util.ExtraCodecs.RecursiveCodec<T>
All Implemented Interfaces:
com.mojang.serialization.Codec<T>, com.mojang.serialization.Decoder<T>, com.mojang.serialization.Encoder<T>
Enclosing class:
ExtraCodecs

static class ExtraCodecs.RecursiveCodec<T> extends Object implements com.mojang.serialization.Codec<T>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.mojang.serialization.Codec

    com.mojang.serialization.Codec.ResultFunction<A extends Object>

    Nested classes/interfaces inherited from interface com.mojang.serialization.Decoder

    com.mojang.serialization.Decoder.Boxed<A extends Object>, com.mojang.serialization.Decoder.Simple<A extends Object>, com.mojang.serialization.Decoder.Terminal<A extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Supplier<com.mojang.serialization.Codec<T>>
     

    Fields inherited from interface com.mojang.serialization.Codec

    BOOL, BYTE, BYTE_BUFFER, DOUBLE, EMPTY, FLOAT, INT, INT_STREAM, LONG, LONG_STREAM, PASSTHROUGH, SHORT, STRING
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecursiveCodec(Function<com.mojang.serialization.Codec<T>,com.mojang.serialization.Codec<T>> p_300700_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <S> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<T,S>>
    decode(com.mojang.serialization.DynamicOps<S> p_298423_, S p_298846_)
     
    <S> com.mojang.serialization.DataResult<S>
    encode(T p_297845_, com.mojang.serialization.DynamicOps<S> p_300705_, S p_299581_)
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.mojang.serialization.Codec

    comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, stable, withLifecycle, xmap

    Methods inherited from interface com.mojang.serialization.Decoder

    boxed, decode, flatMap, map, parse, parse, simple, terminal

    Methods inherited from interface com.mojang.serialization.Encoder

    comap, encodeStart, flatComap
  • Field Details

    • wrapped

      private final Supplier<com.mojang.serialization.Codec<T>> wrapped
  • Constructor Details

    • RecursiveCodec

      RecursiveCodec(Function<com.mojang.serialization.Codec<T>,com.mojang.serialization.Codec<T>> p_300700_)
  • Method Details

    • decode

      public <S> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<T,S>> decode(com.mojang.serialization.DynamicOps<S> p_298423_, S p_298846_)
      Specified by:
      decode in interface com.mojang.serialization.Decoder<T>
    • encode

      public <S> com.mojang.serialization.DataResult<S> encode(T p_297845_, com.mojang.serialization.DynamicOps<S> p_300705_, S p_299581_)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<T>
    • toString

      public String toString()
      Overrides:
      toString in class Object