Documentation ¶
Index ¶
- Constants
- Variables
- func NbtMarshal(w io.Writer, v interface{}) error
- func NbtMarshalCompound(w io.Writer, v interface{}, rootTagName string) error
- func NbtUnmarshal(data []byte, v interface{}) error
- type Angle
- type Chat
- type EntityMetadataWriter
- func (writer *EntityMetadataWriter) Done()
- func (writer *EntityMetadataWriter) StartNBT(index byte) NbtWriter
- func (writer *EntityMetadataWriter) WriteBoolean(index byte, val bool)
- func (writer *EntityMetadataWriter) WriteByte(index byte, val byte)
- func (writer *EntityMetadataWriter) WriteFloat(index byte, val float32)
- func (writer *EntityMetadataWriter) WritePose(index byte, val Pose)
- func (writer *EntityMetadataWriter) WritePosition(index byte, val Position)
- func (writer *EntityMetadataWriter) WriteString(index byte, val string)
- func (writer *EntityMetadataWriter) WriteVarint(index byte, val int32)
- type Face
- type Hinge
- type NbtDecoder
- type NbtDecoderReader
- type NbtEncoder
- type NbtWriter
- func (writer *NbtWriter) EndCompound()
- func (writer *NbtWriter) PushBool(val bool, name string)
- func (writer *NbtWriter) PushByte(val int8, name string)
- func (writer *NbtWriter) PushByteArray(data []byte, name string)
- func (writer *NbtWriter) PushDouble(val float64, name string)
- func (writer *NbtWriter) PushFloat(val float32, name string)
- func (writer *NbtWriter) PushInt(val int32, name string)
- func (writer *NbtWriter) PushIntArray(data []int32, name string)
- func (writer *NbtWriter) PushLong(val int64, name string)
- func (writer *NbtWriter) PushLongArray(data []int64, name string)
- func (writer *NbtWriter) PushShort(val int16, name string)
- func (writer *NbtWriter) PushString(val string, name string)
- func (writer *NbtWriter) StartCompound(name string)
- type Pose
- type Position
- type Reader
- func (reader *Reader) Read(p []byte) (int, error)
- func (reader *Reader) ReadAngle() Angle
- func (reader *Reader) ReadBoolean() bool
- func (reader *Reader) ReadByte() byte
- func (reader *Reader) ReadBytes(size int) []byte
- func (reader *Reader) ReadChat() Chat
- func (reader *Reader) ReadDouble() float64
- func (reader *Reader) ReadFloat() float32
- func (reader *Reader) ReadIdentifier() string
- func (reader *Reader) ReadInt() int32
- func (reader *Reader) ReadLong() int64
- func (reader *Reader) ReadPosition() Position
- func (reader *Reader) ReadShort() int16
- func (reader *Reader) ReadString(maxLen int) string
- func (reader *Reader) ReadUInt() uint32
- func (reader *Reader) ReadULong() uint64
- func (reader *Reader) ReadUShort() uint16
- func (reader *Reader) ReadUUID() uuid.UUID
- func (reader *Reader) ReadUUIDFromString() uuid.UUID
- func (reader *Reader) ReadVarint() int32
- func (reader *Reader) ReadVarlong() int64
- type Shape
- type Writer
- func (writer *Writer) Bytes() []byte
- func (writer *Writer) StartEntityMetadata() *EntityMetadataWriter
- func (writer *Writer) StartNBT() NbtWriter
- func (writer *Writer) WriteAngle(angle Angle)
- func (writer *Writer) WriteBoolean(val bool)
- func (writer *Writer) WriteByte(val byte)
- func (writer *Writer) WriteBytes(data []byte)
- func (writer *Writer) WriteChat(val Chat)
- func (writer *Writer) WriteDouble(val float64)
- func (writer *Writer) WriteFloat(val float32)
- func (writer *Writer) WriteInt(val int32)
- func (writer *Writer) WriteJson(val interface{})
- func (writer *Writer) WriteLong(val int64)
- func (writer *Writer) WritePosition(pos Position)
- func (writer *Writer) WriteShort(val int16)
- func (writer *Writer) WriteString(val string)
- func (writer *Writer) WriteUInt(val uint32)
- func (writer *Writer) WriteULong(val uint64)
- func (writer *Writer) WriteUShort(val uint16)
- func (writer *Writer) WriteUUID(val uuid.UUID)
- func (writer *Writer) WriteUUIDAsString(val uuid.UUID)
- func (writer *Writer) WriteVarint(val int32)
- func (writer *Writer) WriteVarlong(val int64)
Constants ¶
View Source
const ( FaceBottom = Face(iota) FaceTop FaceNorth FaceSouth FaceWest FaceEast )
View Source
const ( ShapeStraight = Shape(iota) ShapeInnerLeft ShapeInnerRight ShapeOuterLeft ShapeOuterRight )
View Source
const ( HingeLeft = Hinge(iota) HingeRight )
Variables ¶
View Source
var ErrEND = errors.New("NBT with only Tag_End")
ErrEND error will be returned when reading a NBT with only Tag_End
Functions ¶
func NbtMarshal ¶
func NbtMarshalCompound ¶
func NbtUnmarshal ¶
Types ¶
type Chat ¶
type Chat struct { Text string `json:"text,omitempty"` Bold bool `json:"bold,omitempty"` Italic bool `json:"italic,omitempty"` Underlined bool `json:"underlined,omitempty"` Strikethrough bool `json:"strikethrough,omitempty"` Obfuscated bool `json:"obfuscated,omitempty"` Color string `json:"color,omitempty"` Translate string `json:"translate,omitempty"` With []Chat `json:"with,omitempty"` Extra []Chat `json:"extra,omitempty"` }
type EntityMetadataWriter ¶
type EntityMetadataWriter struct {
// contains filtered or unexported fields
}
func (*EntityMetadataWriter) Done ¶
func (writer *EntityMetadataWriter) Done()
func (*EntityMetadataWriter) StartNBT ¶
func (writer *EntityMetadataWriter) StartNBT(index byte) NbtWriter
func (*EntityMetadataWriter) WriteBoolean ¶
func (writer *EntityMetadataWriter) WriteBoolean(index byte, val bool)
func (*EntityMetadataWriter) WriteByte ¶
func (writer *EntityMetadataWriter) WriteByte(index byte, val byte)
func (*EntityMetadataWriter) WriteFloat ¶
func (writer *EntityMetadataWriter) WriteFloat(index byte, val float32)
func (*EntityMetadataWriter) WritePose ¶
func (writer *EntityMetadataWriter) WritePose(index byte, val Pose)
func (*EntityMetadataWriter) WritePosition ¶
func (writer *EntityMetadataWriter) WritePosition(index byte, val Position)
func (*EntityMetadataWriter) WriteString ¶
func (writer *EntityMetadataWriter) WriteString(index byte, val string)
func (*EntityMetadataWriter) WriteVarint ¶
func (writer *EntityMetadataWriter) WriteVarint(index byte, val int32)
type NbtDecoder ¶
type NbtDecoder struct {
// contains filtered or unexported fields
}
func NewNbtDecoder ¶
func NewNbtDecoder(r io.Reader) *NbtDecoder
func (*NbtDecoder) Decode ¶
func (d *NbtDecoder) Decode(v interface{}) error
type NbtDecoderReader ¶
type NbtDecoderReader = interface { io.ByteScanner io.Reader }
type NbtEncoder ¶
type NbtEncoder struct {
// contains filtered or unexported fields
}
func NbtNewEncoder ¶
func NbtNewEncoder(w io.Writer) *NbtEncoder
func (*NbtEncoder) Encode ¶
func (e *NbtEncoder) Encode(v interface{}) error
type NbtWriter ¶
type NbtWriter struct {
// contains filtered or unexported fields
}
func (*NbtWriter) EndCompound ¶
func (writer *NbtWriter) EndCompound()
func (*NbtWriter) PushByteArray ¶
func (*NbtWriter) PushDouble ¶
func (*NbtWriter) PushIntArray ¶
func (*NbtWriter) PushLongArray ¶
func (*NbtWriter) PushString ¶
func (*NbtWriter) StartCompound ¶
type Reader ¶
func (*Reader) ReadBoolean ¶
func (*Reader) ReadDouble ¶
func (*Reader) ReadIdentifier ¶
func (*Reader) ReadPosition ¶
func (*Reader) ReadString ¶
func (*Reader) ReadUShort ¶
func (*Reader) ReadUUIDFromString ¶
func (*Reader) ReadVarint ¶
func (*Reader) ReadVarlong ¶
type Writer ¶
func (*Writer) StartEntityMetadata ¶
func (writer *Writer) StartEntityMetadata() *EntityMetadataWriter
func (*Writer) WriteAngle ¶
func (*Writer) WriteBoolean ¶
func (*Writer) WriteBytes ¶
func (*Writer) WriteDouble ¶
func (*Writer) WriteFloat ¶
func (*Writer) WritePosition ¶
func (*Writer) WriteShort ¶
func (*Writer) WriteString ¶
func (*Writer) WriteULong ¶
func (*Writer) WriteUShort ¶
func (*Writer) WriteUUIDAsString ¶
func (*Writer) WriteVarint ¶
func (*Writer) WriteVarlong ¶
Click to show internal directories.
Click to hide internal directories.