java.lang.Object
com.viaversion.viaversion.api.type.Type<Key>
com.viaversion.viaversion.api.type.types.misc.KeyType
All Implemented Interfaces:
ByteBufReader<Key>, ByteBufWriter<Key>, CodecWriter<Key>
Direct Known Subclasses:
TagKeyType

public class KeyType extends Type<Key>
  • Constructor Details

    • KeyType

      public KeyType()
  • Method Details

    • read

      public Key read(io.netty.buffer.ByteBuf buffer)
      Description copied from interface: ByteBufReader
      Reads a value from a ByteBuf.
      Parameters:
      buffer - buffer to read from
      Returns:
      type based on the class type
    • write

      public void write(io.netty.buffer.ByteBuf buffer, Key key)
      Description copied from interface: ByteBufWriter
      Writes an object to a type to a ByteBuf.
      Parameters:
      buffer - buffer to write to
      key - value to write
    • write

      public void write(Ops ops, Key value)
      Specified by:
      write in interface CodecWriter<Key>
      Overrides:
      write in class Type<Key>