(w encoding.Writer)
| 30 | } |
| 31 | |
| 32 | func (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 | |
| 42 | func (p *PlayerCommand) Decode(r encoding.Reader) error { |
| 43 | if _, err := r.VarInt(&p.EntityId); err != nil { |