pocketmine\level\Level::addEntityMovement PHP Метод

addEntityMovement() публичный Метод

public addEntityMovement ( integer $chunkX, integer $chunkZ, integer $entityId, float $x, float $y, float $z, float $yaw, float $pitch, $headYaw = null )
$chunkX integer
$chunkZ integer
$entityId integer
$x float
$y float
$z float
$yaw float
$pitch float
    public function addEntityMovement(int $chunkX, int $chunkZ, int $entityId, float $x, float $y, float $z, float $yaw, float $pitch, $headYaw = null)
    {
        if (!isset($this->moveToSend[$index = Level::chunkHash($chunkX, $chunkZ)])) {
            $this->moveToSend[$index] = [];
        }
        $pk = new MoveEntityPacket();
        $pk->eid = $entityId;
        $pk->x = $x;
        $pk->y = $y;
        $pk->z = $z;
        $pk->yaw = $yaw;
        $pk->headYaw = $headYaw === null ? $yaw : $headYaw;
        $pk->pitch = $pitch;
        $this->moveToSend[$index][$entityId] = $pk;
    }
Level