Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeUtf8m(str []byte) string
- func EncodeUtf8m(str string) (out []byte)
- func WriteNBT(b *PacketBuilder, n NBT)
- type Byte
- type ByteArray
- type Decompressor
- type Double
- type Float
- type Int
- type Long
- type NBT
- type NBTByte
- type NBTByteArray
- type NBTCompound
- func (n *NBTCompound) DecodeFrom(r *PacketReader) (err error)
- func (n *NBTCompound) Encode(b *PacketBuilder)
- func (n *NBTCompound) Get(name string) NBT
- func (n *NBTCompound) Name() string
- func (n *NBTCompound) Set(name string, tag NBT)
- func (n *NBTCompound) SetName(name string)
- func (n *NBTCompound) String() string
- func (n *NBTCompound) Type() Byte
- type NBTDouble
- type NBTEnd
- type NBTFloat
- type NBTIdNotExistsErr
- type NBTInt
- type NBTIntArray
- type NBTList
- type NBTLong
- type NBTLongArray
- type NBTShort
- type NBTString
- type PacketBuilder
- type PacketReader
- type Short
- type String
- type UByte
- type UShort
Constants ¶
View Source
const ( NbtUnknown = -1 NbtEnd = 0x00 NbtByte = 0x01 NbtShort = 0x02 NbtInt = 0x03 NbtLong = 0x04 NbtFloat = 0x05 NbtDouble = 0x06 NbtByteArray = 0x07 NbtString = 0x08 NbtList = 0x09 NbtCompound = 0x0a NbtIntArray = 0x0b NbtLongArray = 0x0c )
Variables ¶
View Source
var NBTNewer = map[Byte]func() NBT{ NbtEnd: func() NBT { return _NBTEndIns }, NbtByte: func() NBT { return new(NBTByte) }, NbtShort: func() NBT { return new(NBTShort) }, NbtInt: func() NBT { return new(NBTInt) }, NbtLong: func() NBT { return new(NBTLong) }, NbtFloat: func() NBT { return new(NBTFloat) }, NbtDouble: func() NBT { return new(NBTDouble) }, NbtByteArray: func() NBT { return new(NBTByteArray) }, NbtString: func() NBT { return new(NBTString) }, NbtList: func() NBT { return new(NBTList) }, NbtCompound: func() NBT { return new(NBTCompound) }, NbtIntArray: func() NBT { return new(NBTIntArray) }, NbtLongArray: func() NBT { return new(NBTLongArray) }, }
Functions ¶
func DecodeUtf8m ¶
Decode Java modified UTF8 to normal UTF8 string
func EncodeUtf8m ¶
Encode a UTF8 string to Java modified UTF8
func WriteNBT ¶
func WriteNBT(b *PacketBuilder, n NBT)
Types ¶
type Decompressor ¶
type NBT ¶
type NBT interface { Type() Byte Name() string SetName(name string) fmt.Stringer liter.Encodable liter.Decodable }
func ParseFromBytes ¶
func ReadNBT ¶
func ReadNBT(r *PacketReader) (n NBT, err error)
type NBTByte ¶
type NBTByte struct { Data Byte // contains filtered or unexported fields }
func (*NBTByte) DecodeFrom ¶
func (n *NBTByte) DecodeFrom(r *PacketReader) (err error)
func (*NBTByte) Encode ¶
func (n *NBTByte) Encode(b *PacketBuilder)
type NBTByteArray ¶
type NBTByteArray struct { Data ByteArray // contains filtered or unexported fields }
func (*NBTByteArray) DecodeFrom ¶
func (n *NBTByteArray) DecodeFrom(r *PacketReader) (err error)
func (*NBTByteArray) Encode ¶
func (n *NBTByteArray) Encode(b *PacketBuilder)
func (*NBTByteArray) Name ¶
func (n *NBTByteArray) Name() string
func (*NBTByteArray) SetName ¶
func (n *NBTByteArray) SetName(name string)
func (*NBTByteArray) String ¶
func (n *NBTByteArray) String() string
func (*NBTByteArray) Type ¶
func (n *NBTByteArray) Type() Byte
type NBTCompound ¶
type NBTCompound struct { Data []NBT // contains filtered or unexported fields }
func (*NBTCompound) DecodeFrom ¶
func (n *NBTCompound) DecodeFrom(r *PacketReader) (err error)
func (*NBTCompound) Encode ¶
func (n *NBTCompound) Encode(b *PacketBuilder)
func (*NBTCompound) Get ¶
func (n *NBTCompound) Get(name string) NBT
func (*NBTCompound) Name ¶
func (n *NBTCompound) Name() string
func (*NBTCompound) Set ¶
func (n *NBTCompound) Set(name string, tag NBT)
func (*NBTCompound) SetName ¶
func (n *NBTCompound) SetName(name string)
func (*NBTCompound) String ¶
func (n *NBTCompound) String() string
func (*NBTCompound) Type ¶
func (n *NBTCompound) Type() Byte
type NBTDouble ¶
type NBTDouble struct { Data Double // contains filtered or unexported fields }
func (*NBTDouble) DecodeFrom ¶
func (n *NBTDouble) DecodeFrom(r *PacketReader) (err error)
func (*NBTDouble) Encode ¶
func (n *NBTDouble) Encode(b *PacketBuilder)
type NBTEnd ¶
type NBTEnd struct{}
func (*NBTEnd) DecodeFrom ¶
func (n *NBTEnd) DecodeFrom(r *PacketReader) error
func (*NBTEnd) Encode ¶
func (n *NBTEnd) Encode(b *PacketBuilder)
type NBTFloat ¶
type NBTFloat struct { Data Float // contains filtered or unexported fields }
func (*NBTFloat) DecodeFrom ¶
func (n *NBTFloat) DecodeFrom(r *PacketReader) (err error)
func (*NBTFloat) Encode ¶
func (n *NBTFloat) Encode(b *PacketBuilder)
type NBTIdNotExistsErr ¶
type NBTIdNotExistsErr struct {
Id Byte
}
func (*NBTIdNotExistsErr) Error ¶
func (e *NBTIdNotExistsErr) Error() string
type NBTInt ¶
type NBTInt struct { Data Int // contains filtered or unexported fields }
func (*NBTInt) DecodeFrom ¶
func (n *NBTInt) DecodeFrom(r *PacketReader) (err error)
func (*NBTInt) Encode ¶
func (n *NBTInt) Encode(b *PacketBuilder)
type NBTIntArray ¶
type NBTIntArray struct { Data []Int // contains filtered or unexported fields }
func (*NBTIntArray) DecodeFrom ¶
func (n *NBTIntArray) DecodeFrom(r *PacketReader) (err error)
func (*NBTIntArray) Encode ¶
func (n *NBTIntArray) Encode(b *PacketBuilder)
func (*NBTIntArray) Name ¶
func (n *NBTIntArray) Name() string
func (*NBTIntArray) SetName ¶
func (n *NBTIntArray) SetName(name string)
func (*NBTIntArray) String ¶
func (n *NBTIntArray) String() string
func (*NBTIntArray) Type ¶
func (n *NBTIntArray) Type() Byte
type NBTList ¶
type NBTList struct { Data []NBT // contains filtered or unexported fields }
func (*NBTList) DecodeFrom ¶
func (n *NBTList) DecodeFrom(r *PacketReader) (err error)
func (*NBTList) Encode ¶
func (n *NBTList) Encode(b *PacketBuilder)
type NBTLong ¶
type NBTLong struct { Data Long // contains filtered or unexported fields }
func (*NBTLong) DecodeFrom ¶
func (n *NBTLong) DecodeFrom(r *PacketReader) (err error)
func (*NBTLong) Encode ¶
func (n *NBTLong) Encode(b *PacketBuilder)
type NBTLongArray ¶
type NBTLongArray struct { Data []Long // contains filtered or unexported fields }
func (*NBTLongArray) DecodeFrom ¶
func (n *NBTLongArray) DecodeFrom(r *PacketReader) (err error)
func (*NBTLongArray) Encode ¶
func (n *NBTLongArray) Encode(b *PacketBuilder)
func (*NBTLongArray) Name ¶
func (n *NBTLongArray) Name() string
func (*NBTLongArray) SetName ¶
func (n *NBTLongArray) SetName(name string)
func (*NBTLongArray) String ¶
func (n *NBTLongArray) String() string
func (*NBTLongArray) Type ¶
func (n *NBTLongArray) Type() Byte
type NBTShort ¶
type NBTShort struct { Data Short // contains filtered or unexported fields }
func (*NBTShort) DecodeFrom ¶
func (n *NBTShort) DecodeFrom(r *PacketReader) (err error)
func (*NBTShort) Encode ¶
func (n *NBTShort) Encode(b *PacketBuilder)
type NBTString ¶
type NBTString struct { Data String // contains filtered or unexported fields }
func (*NBTString) DecodeFrom ¶
func (n *NBTString) DecodeFrom(r *PacketReader) (err error)
func (*NBTString) Encode ¶
func (n *NBTString) Encode(b *PacketBuilder)
type PacketBuilder ¶
type PacketBuilder = liter.PacketBuilder
type PacketReader ¶
type PacketReader = liter.PacketReader
Click to show internal directories.
Click to hide internal directories.