Versions in this module Expand all Collapse all v0 v0.0.0 Dec 30, 2023 Changes in this version + const MaxDataLength + const MaxVarIntLen + const MaxVarLongLen + type Angle Byte + func (a *Angle) ReadFrom(r io.Reader) (int64, error) + func (a Angle) ToDeg() float64 + func (a Angle) ToRad() float64 + func (a Angle) WriteTo(w io.Writer) (int64, error) + type Ary struct + Ary any + func (a Ary[LEN]) ReadFrom(r io.Reader) (n int64, err error) + func (a Ary[LEN]) WriteTo(w io.Writer) (n int64, err error) + type BitSet []int64 + func (b *BitSet) ReadFrom(r io.Reader) (n int64, err error) + func (b BitSet) Get(index int) bool + func (b BitSet) Len() int + func (b BitSet) Set(index int, value bool) + func (b BitSet) WriteTo(w io.Writer) (n int64, err error) + type Boolean bool + func (b *Boolean) ReadFrom(r io.Reader) (n int64, err error) + func (b Boolean) WriteTo(w io.Writer) (int64, error) + type Builder struct + func (p *Builder) Packet(id int32) Packet + func (p *Builder) WriteField(fields ...FieldEncoder) + type Byte int8 + func (b *Byte) ReadFrom(r io.Reader) (n int64, err error) + func (b Byte) WriteTo(w io.Writer) (n int64, err error) + type ByteArray []byte + func (b *ByteArray) ReadFrom(r io.Reader) (n int64, err error) + func (b ByteArray) WriteTo(w io.Writer) (n int64, err error) + type Chat = String + type Double float64 + func (d *Double) ReadFrom(r io.Reader) (n int64, err error) + func (d Double) WriteTo(w io.Writer) (n int64, err error) + type Field interface + func Array(ary any) Field + func NBT(v any) Field + type FieldDecoder io.ReaderFrom + type FieldEncoder io.WriterTo + type FixedBitSet []byte + func NewFixedBitSet(n int64) FixedBitSet + func (f FixedBitSet) Get(index int) bool + func (f FixedBitSet) Len() int + func (f FixedBitSet) ReadFrom(r io.Reader) (n int64, err error) + func (f FixedBitSet) Set(index int, value bool) + func (f FixedBitSet) WriteTo(w io.Writer) (n int64, err error) + type Float float32 + func (f *Float) ReadFrom(r io.Reader) (n int64, err error) + func (f Float) WriteTo(w io.Writer) (n int64, err error) + type Identifier = String + type Int int32 + func (i *Int) ReadFrom(r io.Reader) (n int64, err error) + func (i Int) WriteTo(w io.Writer) (int64, error) + type Long int64 + func (l *Long) ReadFrom(r io.Reader) (n int64, err error) + func (l Long) WriteTo(w io.Writer) (int64, error) + type NBTField struct + AllowUnknownFields bool + V any + func (n NBTField) ReadFrom(r io.Reader) (int64, error) + func (n NBTField) WriteTo(w io.Writer) (int64, error) + type Opt struct + Field any + Has any + func (o Opt) ReadFrom(r io.Reader) (int64, error) + func (o Opt) WriteTo(w io.Writer) (int64, error) + type Option struct + Has Boolean + Val T + func (o *Option[T, P]) Pointer() (p *T) + func (o *Option[T, P]) ReadFrom(r io.Reader) (n int64, err error) + func (o Option[T, P]) WriteTo(w io.Writer) (n int64, err error) + type OptionDecoder struct + Has Boolean + Val T + func (o *OptionDecoder[T, P]) ReadFrom(r io.Reader) (n int64, err error) + type OptionEncoder struct + Has Boolean + Val T + func (o OptionEncoder[T]) WriteTo(w io.Writer) (n int64, err error) + type Packet struct + Data []byte + ID int32 + func Marshal[ID ~int32 | int](id ID, fields ...FieldEncoder) (pk Packet) + func (p *Packet) Pack(w io.Writer, threshold int) error + func (p *Packet) UnPack(r io.Reader, threshold int) error + func (p Packet) Scan(fields ...FieldDecoder) error + type PluginMessageData []byte + func (p *PluginMessageData) ReadFrom(r io.Reader) (n int64, err error) + func (p PluginMessageData) WriteTo(w io.Writer) (n int64, err error) + type Position struct + X int + Y int + Z int + func (p *Position) ReadFrom(r io.Reader) (n int64, err error) + func (p Position) WriteTo(w io.Writer) (n int64, err error) + type Short int16 + func (s *Short) ReadFrom(r io.Reader) (n int64, err error) + func (s Short) WriteTo(w io.Writer) (int64, error) + type String string + func (s *String) ReadFrom(r io.Reader) (n int64, err error) + func (s String) WriteTo(w io.Writer) (int64, error) + type Tuple []any + func (t Tuple) ReadFrom(r io.Reader) (n int64, err error) + func (t Tuple) WriteTo(w io.Writer) (n int64, err error) + type UUID uuid.UUID + func (u *UUID) ReadFrom(r io.Reader) (n int64, err error) + func (u UUID) WriteTo(w io.Writer) (n int64, err error) + type UnsignedByte uint8 + func (u *UnsignedByte) ReadFrom(r io.Reader) (n int64, err error) + func (u UnsignedByte) WriteTo(w io.Writer) (n int64, err error) + type UnsignedShort uint16 + func (us *UnsignedShort) ReadFrom(r io.Reader) (n int64, err error) + func (us UnsignedShort) WriteTo(w io.Writer) (int64, error) + type VarInt int32 + func (v *VarInt) ReadFrom(r io.Reader) (n int64, err error) + func (v VarInt) Len() int + func (v VarInt) WriteTo(w io.Writer) (n int64, err error) + func (v VarInt) WriteToBytes(buf []byte) int + type VarLong int64 + func (v *VarLong) ReadFrom(r io.Reader) (n int64, err error) + func (v VarLong) Len() int + func (v VarLong) WriteTo(w io.Writer) (n int64, err error) + func (v VarLong) WriteToBytes(buf []byte) int