public static generateChunkLoaderId ( pocketmine\level\ChunkLoader $loader ) : integer | ||
$loader | pocketmine\level\ChunkLoader | |
리턴 | integer |
/** * @param SourceInterface $interface * @param null $clientID * @param string $ip * @param integer $port */ public function __construct(SourceInterface $interface, $clientID, $ip, $port) { $this->interface = $interface; $this->windows = new \SplObjectStorage(); $this->perm = new PermissibleBase($this); $this->namedtag = new Compound(); $this->server = Server::getInstance(); $this->lastBreak = PHP_INT_MAX; $this->ip = $ip; $this->port = $port; $this->clientID = $clientID; $this->loaderId = Level::generateChunkLoaderId($this); $this->chunksPerTick = (int) $this->server->getProperty("chunk-sending.per-tick", 4); $this->spawnThreshold = (int) $this->server->getProperty("chunk-sending.spawn-threshold", 56); $this->spawnPosition = null; $this->gamemode = $this->server->getGamemode(); $this->setLevel($this->server->getDefaultLevel()); $this->viewDistance = $this->server->getViewDistance(); $this->newPosition = new Vector3(0, 0, 0); $this->boundingBox = new AxisAlignedBB(0, 0, 0, 0, 0, 0); $this->uuid = null; $this->rawUUID = null; $this->creationTime = microtime(true); }