Versions in this module Expand all Collapse all v1 v1.15.2 Oct 3, 2021 Changes in this version + func Compress(data []byte) []byte + func ReadNBytes(r DecodeReader, n int) (bs []byte, err error) + type Angle int8 + func (b *Angle) Decode(r DecodeReader) error + type Ary struct + Ary interface{} + Len Field + func (a Ary) Decode(r DecodeReader) error + func (a Ary) Encode() (data []byte) + type Boolean bool + func (b *Boolean) Decode(r DecodeReader) error + func (b Boolean) Encode() []byte + type Byte int8 + func (b *Byte) Decode(r DecodeReader) error + func (b Byte) Encode() []byte + type ByteArray []byte + func (b *ByteArray) Decode(r DecodeReader) error + func (b ByteArray) Encode() []byte + type Chat = String + type DecodeReader interface + type Double float64 + func (d *Double) Decode(r DecodeReader) error + func (d Double) Encode() []byte + type Field interface + type FieldDecoder interface + Decode func(r DecodeReader) error + type FieldEncoder interface + Encode func() []byte + type Float float32 + func (f *Float) Decode(r DecodeReader) error + func (f Float) Encode() []byte + type Identifier = String + type Int int32 + func (i *Int) Decode(r DecodeReader) error + func (i Int) Encode() []byte + type Long int64 + func (l *Long) Decode(r DecodeReader) error + func (l Long) Encode() []byte + type NBT struct + V interface{} + func (n NBT) Decode(r DecodeReader) error + type Opt struct + Field interface{} + Has func() bool + func (o Opt) Decode(r DecodeReader) error + func (o Opt) Encode() []byte + type Packet struct + Data []byte + ID int32 + func Marshal(id data.PktID, fields ...FieldEncoder) (pk Packet) + func RecvPacket(r DecodeReader, useZlib bool) (*Packet, error) + func UnCompress(data []byte) (*Packet, error) + func (p *Packet) Pack(threshold int) (pack []byte) + func (p Packet) Scan(fields ...FieldDecoder) error + type Position struct + X int + Y int + Z int + func (p *Position) Decode(r DecodeReader) error + func (p Position) Encode() []byte + type Short int16 + func (s *Short) Decode(r DecodeReader) error + func (s Short) Encode() []byte + type String string + func (s *String) Decode(r DecodeReader) error + func (s String) Encode() (p []byte) + type UUID uuid.UUID + func (u *UUID) Decode(r DecodeReader) error + func (u UUID) Encode() []byte + type UnsignedByte uint8 + func (ub *UnsignedByte) Decode(r DecodeReader) error + func (ub UnsignedByte) Encode() []byte + type UnsignedShort uint16 + func (us *UnsignedShort) Decode(r DecodeReader) error + func (us UnsignedShort) Encode() []byte + type VarInt int32 + func (v *VarInt) Decode(r DecodeReader) error + func (v VarInt) Encode() (vi []byte) + type VarLong int64 + func (v *VarLong) Decode(r DecodeReader) error + func (v VarLong) Encode() (vi []byte)