Add Path finding (#459)

* add initial path finding

* Make everything work

:D
This commit is contained in:
Alexander Medvedev
2025-01-06 11:41:05 +01:00
committed by GitHub
parent 6a34f6cc6c
commit e15b2e06ae
9 changed files with 198 additions and 3 deletions

View File

@@ -157,6 +157,7 @@ impl Entity {
self.yaw.store(yaw);
// send packet
// TODO: do caching, only send packet when needed
let yaw = (yaw * 256.0 / 360.0).rem_euclid(256.0);
let pitch = (pitch * 256.0 / 360.0).rem_euclid(256.0);
self.world