MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / Encode

Method Encode

protocol/net/packet/play/blockEntityData.go:21–32  ·  view source on GitHub ↗
(w encoding.Writer)

Source from the content-addressed store, hash-verified

19}
20
21func (b *BlockEntityData) Encode(w encoding.Writer) error {
22 if err := w.Position(b.X, b.Y, b.Z); err != nil {
23 return err
24 }
25 if err := w.VarInt(b.Type); err != nil {
26 return err
27 }
28 if b.Data == nil {
29 return w.Byte(nbt.End)
30 }
31 return w.NBT(b.Data)
32}
33
34func (b *BlockEntityData) Decode(r encoding.Reader) error {
35 return nil //TODO

Callers

nothing calls this directly

Calls 4

PositionMethod · 0.45
VarIntMethod · 0.45
ByteMethod · 0.45
NBTMethod · 0.45

Tested by

no test coverage detected