(w encoding.Writer)
| 17 | } |
| 18 | |
| 19 | func (d *SetEntityVelocity) Encode(w encoding.Writer) error { |
| 20 | if err := w.VarInt(d.EntityId); err != nil { |
| 21 | return err |
| 22 | } |
| 23 | if err := w.Short(d.X); err != nil { |
| 24 | return err |
| 25 | } |
| 26 | if err := w.Short(d.Y); err != nil { |
| 27 | return err |
| 28 | } |
| 29 | return w.Short(d.Z) |
| 30 | } |
| 31 | |
| 32 | func (d *SetEntityVelocity) Decode(r encoding.Reader) error { |
| 33 | if _, err := r.VarInt(&d.EntityId); err != nil { |