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

Method Encode

protocol/net/packet/play/blockAction.go:20–31  ·  view source on GitHub ↗
(w encoding.Writer)

Source from the content-addressed store, hash-verified

18}
19
20func (b *BlockAction) Encode(w encoding.Writer) error {
21 if err := w.Position(b.X, b.Y, b.Z); err != nil {
22 return err
23 }
24 if err := w.Ubyte(b.ActionId); err != nil {
25 return err
26 }
27 if err := w.Ubyte(b.ActionParameter); err != nil {
28 return err
29 }
30 return w.VarInt(b.BlockType)
31}
32
33func (b *BlockAction) Decode(r encoding.Reader) error {
34 if err := r.Position(&b.X, &b.Y, &b.Z); err != nil {

Callers

nothing calls this directly

Calls 3

PositionMethod · 0.45
UbyteMethod · 0.45
VarIntMethod · 0.45

Tested by

no test coverage detected