fix: avoid returning empty optional velocity for entity spawn packets
Returning an empty optional for the entity spawn velocity packets would apply a negative velocity (-1 on all axes) due to PacketEvents implementation. This affects client-side updated entities like fireworks.
This commit is contained in:
parent
f62986892a
commit
aac39a3a0b
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ public class WrapperEntity implements Tickable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (veloX == 0 && veloY == 0 && veloZ == 0) {
|
if (veloX == 0 && veloY == 0 && veloZ == 0) {
|
||||||
velocity = Optional.empty();
|
velocity = Optional.of(Vector3d.zero());
|
||||||
} else {
|
} else {
|
||||||
velocity = Optional.of(new Vector3d(veloX, veloY, veloZ));
|
velocity = Optional.of(new Vector3d(veloX, veloY, veloZ));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue