Class ComponentSerialization.FuzzyCodec<T>

java.lang.Object
com.mojang.serialization.CompressorHolder
com.mojang.serialization.MapCodec<T>
net.minecraft.network.chat.ComponentSerialization.FuzzyCodec<T>
All Implemented Interfaces:
com.mojang.serialization.Compressable, com.mojang.serialization.Keyable, com.mojang.serialization.MapDecoder<T>, com.mojang.serialization.MapEncoder<T>
Enclosing class:
ComponentSerialization

static class ComponentSerialization.FuzzyCodec<T> extends com.mojang.serialization.MapCodec<T>
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.mojang.serialization.MapCodec

    com.mojang.serialization.MapCodec.MapCodecCodec<A extends Object>, com.mojang.serialization.MapCodec.ResultFunction<A extends Object>

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

    com.mojang.serialization.MapDecoder.Implementation<A extends Object>

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

    com.mojang.serialization.MapEncoder.Implementation<A extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final List<com.mojang.serialization.MapCodec<? extends T>>
     
    private final Function<T,com.mojang.serialization.MapEncoder<? extends T>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FuzzyCodec(List<com.mojang.serialization.MapCodec<? extends T>> p_304495_, Function<T,com.mojang.serialization.MapEncoder<? extends T>> p_304594_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <S> com.mojang.serialization.DataResult<T>
    decode(com.mojang.serialization.DynamicOps<S> p_304922_, com.mojang.serialization.MapLike<S> p_304447_)
     
    <S> com.mojang.serialization.RecordBuilder<S>
    encode(T p_304409_, com.mojang.serialization.DynamicOps<S> p_304945_, com.mojang.serialization.RecordBuilder<S> p_304823_)
     
    <S> Stream<S>
    keys(com.mojang.serialization.DynamicOps<S> p_304770_)
     
     

    Methods inherited from class com.mojang.serialization.MapCodec

    codec, dependent, deprecated, fieldOf, flatXmap, forGetter, mapResult, of, of, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, setPartial, stable, unit, unit, withLifecycle, xmap

    Methods inherited from class com.mojang.serialization.CompressorHolder

    compressor

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.mojang.serialization.MapDecoder

    ap, compressedDecode, compressor, decoder, flatMap, map

    Methods inherited from interface com.mojang.serialization.MapEncoder

    comap, compressedBuilder, compressor, encoder, flatComap
  • Field Details

    • codecs

      private final List<com.mojang.serialization.MapCodec<? extends T>> codecs
    • encoderGetter

      private final Function<T,com.mojang.serialization.MapEncoder<? extends T>> encoderGetter
  • Constructor Details

    • FuzzyCodec

      public FuzzyCodec(List<com.mojang.serialization.MapCodec<? extends T>> p_304495_, Function<T,com.mojang.serialization.MapEncoder<? extends T>> p_304594_)
  • Method Details

    • decode

      public <S> com.mojang.serialization.DataResult<T> decode(com.mojang.serialization.DynamicOps<S> p_304922_, com.mojang.serialization.MapLike<S> p_304447_)
    • encode

      public <S> com.mojang.serialization.RecordBuilder<S> encode(T p_304409_, com.mojang.serialization.DynamicOps<S> p_304945_, com.mojang.serialization.RecordBuilder<S> p_304823_)
    • keys

      public <S> Stream<S> keys(com.mojang.serialization.DynamicOps<S> p_304770_)
      Specified by:
      keys in interface com.mojang.serialization.Keyable
      Specified by:
      keys in class com.mojang.serialization.MapCodec<T>
    • toString

      public String toString()
      Overrides:
      toString in class Object