Merge pull request #21 from steveb05/fix/incorrect-velocity-packet

Avoid returning empty optional velocity for entity spawn packets
This commit is contained in:
Tofaa 2025-02-16 02:15:21 +04:00 committed by GitHub
commit b8df40f6c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -123,7 +123,7 @@ public class WrapperEntity implements Tickable {
}
}
if (veloX == 0 && veloY == 0 && veloZ == 0) {
velocity = Optional.empty();
velocity = Optional.of(Vector3d.zero());
} else {
velocity = Optional.of(new Vector3d(veloX, veloY, veloZ));
}