Documentation
¶
Overview ¶
Package encoding provides encoding and decoding of minecraft data types
Index ¶
- func AppendByte(data []byte, b int8) []byte
- func AppendInt(data []byte, i int32) []byte
- func AppendLong(data []byte, l int64) []byte
- func AppendShort(data []byte, s int16) []byte
- func AppendString(data []byte, str string) []byte
- func AppendUbyte(data []byte, b byte) []byte
- func AppendUshort(data []byte, s uint16) []byte
- func AppendVarInt(data []byte, value int32) []byte
- func AppendVarLong(data []byte, value int64) []byte
- func PutVarInt(data []byte, value int32) (n int)
- func ReadVarInt(r io.Reader) (int32, error)
- func String(data []byte) (string, error)
- func VarInt(data []byte) (int32, []byte, error)
- func WriteVarInt(w io.Writer, value int32) error
- type BitSet
- type FixedBitSet
- type Reader
- func (r Reader) BitSet(data *BitSet) error
- func (r Reader) Bool(b *bool) error
- func (r Reader) Byte(i *int8) error
- func (r Reader) ByteArray(s *[]byte) error
- func (r Reader) Double(f *float64) error
- func (r Reader) FixedBitSet(data *FixedBitSet, bits int32) error
- func (r Reader) FixedByteArray(s []byte) error
- func (r Reader) Float(f *float32) error
- func (r Reader) Identifier(s *string) error
- func (r Reader) Int(i *int32) error
- func (r Reader) JSONTextComponent(comp *text.TextComponent) error
- func (r Reader) Long(i *int64) error
- func (r Reader) NBT(v any) error
- func (r Reader) Position(x, y, z *int32) error
- func (r Reader) Read(dst []byte) (i int, err error)
- func (r Reader) ReadAll(data *[]byte) (err error)
- func (r *Reader) SetLength(length int)
- func (r Reader) Short(i *int16) error
- func (r Reader) String(s *string) error
- func (r Reader) TextComponent(comp *text.TextComponent) error
- func (r Reader) UUID(u *uuid.UUID) error
- func (r Reader) Ubyte(i *byte) error
- func (r Reader) Ushort(i *uint16) error
- func (r Reader) VarInt(value *int32) (i int, err error)
- func (r Reader) VarLong(value *int64) error
- type Writer
- func (w Writer) BitSet(data BitSet) error
- func (w Writer) Bool(b bool) error
- func (w Writer) Byte(i int8) error
- func (w Writer) ByteArray(s []byte) error
- func (w Writer) Double(f float64) error
- func (w Writer) FixedBitSet(data FixedBitSet) error
- func (w Writer) FixedByteArray(s []byte) error
- func (w Writer) Float(f float32) error
- func (w Writer) Identifier(s string) error
- func (w Writer) Int(i int32) error
- func (w Writer) JSONTextComponent(comp text.TextComponent) error
- func (w Writer) Long(i int64) error
- func (w Writer) NBT(data any) error
- func (w Writer) Position(x, y, z int32) error
- func (w Writer) Short(i int16) error
- func (w Writer) String(s string) error
- func (w Writer) StringTextComponent(text string) error
- func (w Writer) TextComponent(comp text.TextComponent) error
- func (w Writer) UUID(u uuid.UUID) error
- func (w Writer) Ubyte(i uint8) error
- func (w Writer) Ushort(i uint16) error
- func (w Writer) VarInt(value int32) error
- func (w Writer) VarLong(value int64) error
- func (w Writer) Write(data []byte) (i int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendByte ¶
func AppendLong ¶
func AppendShort ¶
func AppendString ¶
func AppendUbyte ¶
func AppendUshort ¶
func AppendVarInt ¶
func AppendVarLong ¶
Types ¶
type FixedBitSet ¶
type FixedBitSet []byte
func (FixedBitSet) Get ¶
func (set FixedBitSet) Get(i int) bool
func (FixedBitSet) Set ¶
func (set FixedBitSet) Set(i int)
func (FixedBitSet) Unset ¶
func (set FixedBitSet) Unset(i int)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (Reader) FixedBitSet ¶
func (r Reader) FixedBitSet(data *FixedBitSet, bits int32) error
func (Reader) FixedByteArray ¶
func (Reader) Identifier ¶
func (Reader) JSONTextComponent ¶
func (r Reader) JSONTextComponent(comp *text.TextComponent) error
func (Reader) TextComponent ¶
func (r Reader) TextComponent(comp *text.TextComponent) error
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (Writer) FixedBitSet ¶
func (w Writer) FixedBitSet(data FixedBitSet) error
func (Writer) FixedByteArray ¶
func (Writer) Identifier ¶
func (Writer) JSONTextComponent ¶
func (w Writer) JSONTextComponent(comp text.TextComponent) error
func (Writer) StringTextComponent ¶
func (Writer) TextComponent ¶
func (w Writer) TextComponent(comp text.TextComponent) error
Click to show internal directories.
Click to hide internal directories.