diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 7d7eb861c..9b59586ff 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1595,8 +1595,7 @@ 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{ - //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); + $this->broadcastMovement(); $distance = sqrt((($from->x - $to->x) ** 2) + (($from->z - $to->z) ** 2)); //TODO: check swimming (adds 0.015 exhaustion in MCPE) diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 0889ab07c..05bf75f4b 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -835,7 +835,11 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ $pk->headYaw = $this->yaw; $pk->mode = $teleport ? MovePlayerPacket::MODE_TELEPORT : MovePlayerPacket::MODE_NORMAL; - $this->level->addChunkPacket($this->getFloorX() >> 4, $this->getFloorZ() >> 4, $pk); + //we can't assume that everyone who is using our chunk wants to see this movement, + //because this human might be a player who shouldn't be receiving his own movement. + //this didn't matter when we were able to use MoveActorPacket because + //the client just ignored MoveActor for itself, but it doesn't ignore MovePlayer for itself. + $this->server->broadcastPacket($this->hasSpawned, $pk); } public function close() : void{