Player: workaround 1.14.30 movement bug

I can understand why this bug happened, but it doesn't mean I like it.
Fix it pls mojang, this sucks.
This commit is contained in:
Dylan K. Taylor 2020-02-13 19:40:22 +00:00
parent a860ccd259
commit d63d6b73f6

View File

@ -1594,7 +1594,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
if($to->distanceSquared($ev->getTo()) > 0.01){ //If plugins modify the destination
$this->teleport($ev->getTo());
}else{
$this->broadcastMovement();
//TODO: workaround 1.14.30 bug: MoveActor(Absolute|Delta)Packet don't work on players anymore :(
$this->sendPosition($this, $this->yaw, $this->pitch, MovePlayerPacket::MODE_NORMAL, $this->hasSpawned);
$distance = sqrt((($from->x - $to->x) ** 2) + (($from->z - $to->z) ** 2));
//TODO: check swimming (adds 0.015 exhaustion in MCPE)