Class DecoderPair<T>

java.lang.Object
de.craftsblock.craftsnet.api.codec.CodecPair<T,Decoder<T,?>>
de.craftsblock.craftsnet.api.codec.DecoderPair<T>
Type Parameters:
T - The target type to be decoded.

@Experimental public final class DecoderPair<T> extends CodecPair<T,Decoder<T,?>>
A pairing between a specific target type and its associated Decoder.

This class allows registration or lookup of decoders based on the target type they support.

Since:
3.5.0
See Also:
  • Constructor Details

    • DecoderPair

      public DecoderPair(Class<T> target, Decoder<T,?> codec)
      Constructs a new DecoderPair for the given target type and decoder.
      Parameters:
      target - The type the decoder can decode to.
      codec - The decoder instance.