Class ColorCodec

java.lang.Object
foundry.veil.api.util.ColorCodec
All Implemented Interfaces:
com.mojang.serialization.Codec<Integer>, com.mojang.serialization.Decoder<Integer>, com.mojang.serialization.Encoder<Integer>

public class ColorCodec extends Object implements com.mojang.serialization.Codec<Integer>
  • Nested Class Summary

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

    com.mojang.serialization.Codec.RecursiveCodec<T>, com.mojang.serialization.Codec.ResultFunction<A>

    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
    static final com.mojang.serialization.Codec<Integer>
     
    static final com.mojang.serialization.Codec<Integer>
     

    Fields inherited from interface com.mojang.serialization.Codec

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

    Modifier and Type
    Method
    Description
    <T> com.mojang.serialization.DataResult<com.mojang.datafixers.util.Pair<Integer,T>>
    decode(com.mojang.serialization.DynamicOps<T> ops, T input)
     
    <T> com.mojang.serialization.DataResult<T>
    encode(Integer input, com.mojang.serialization.DynamicOps<T> ops, T prefix)
     

    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.Codec

    comapFlatMap, deprecated, dispatch, dispatch, dispatchMap, dispatchMap, dispatchStable, fieldOf, flatComapMap, flatXmap, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, lenientOptionalFieldOf, listOf, listOf, mapResult, optionalFieldOf, optionalFieldOf, optionalFieldOf, optionalFieldOf, orElse, orElse, orElse, orElseGet, orElseGet, orElseGet, partialDispatch, promotePartial, sizeLimitedListOf, stable, validate, 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

    • RGB_CODEC

      public static final com.mojang.serialization.Codec<Integer> RGB_CODEC
    • ARGB_CODEC

      public static final com.mojang.serialization.Codec<Integer> ARGB_CODEC
  • Method Details

    • decode

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

      public <T> com.mojang.serialization.DataResult<T> encode(Integer input, com.mojang.serialization.DynamicOps<T> ops, T prefix)
      Specified by:
      encode in interface com.mojang.serialization.Encoder<Integer>