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

Method Encode

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

Source from the content-addressed store, hash-verified

30}
31
32func (p *PlayerCommand) Encode(w encoding.Writer) error {
33 if err := w.VarInt(p.EntityId); err != nil {
34 return err
35 }
36 if err := w.VarInt(p.ActionId); err != nil {
37 return err
38 }
39 return w.VarInt(p.JumpBoost)
40}
41
42func (p *PlayerCommand) Decode(r encoding.Reader) error {
43 if _, err := r.VarInt(&p.EntityId); err != nil {

Callers

nothing calls this directly

Calls 1

VarIntMethod · 0.45

Tested by

no test coverage detected