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

Method Encode

protocol/net/packet/play/setEntityVelocity.go:19–30  ·  view source on GitHub ↗
(w encoding.Writer)

Source from the content-addressed store, hash-verified

17}
18
19func (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
32func (d *SetEntityVelocity) Decode(r encoding.Reader) error {
33 if _, err := r.VarInt(&d.EntityId); err != nil {

Callers

nothing calls this directly

Calls 2

VarIntMethod · 0.45
ShortMethod · 0.45

Tested by

no test coverage detected