本文整理匯總了PHP中pocketmine\level\format\FullChunk::getZ方法的典型用法代碼示例。如果您正苦於以下問題:PHP FullChunk::getZ方法的具體用法?PHP FullChunk::getZ怎麽用?PHP FullChunk::getZ使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pocketmine\level\format\FullChunk
的用法示例。
在下文中一共展示了FullChunk::getZ方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: writeChunk
public function writeChunk(FullChunk $chunk)
{
$this->lastUsed = \time();
$chunkData = $chunk->toBinary();
if ($chunkData !== \false) {
$this->saveChunk($chunk->getX() - $this->getX() * 32, $chunk->getZ() - $this->getZ() * 32, $chunkData);
}
}
示例2: onChunkChanged
public function onChunkChanged(FullChunk $chunk)
{
$this->loadQueue[Level::chunkHash($chunk->getX(), $chunk->getZ())] = abs(($this->x >> 4) - $chunk->getX()) + abs(($this->z >> 4) - $chunk->getZ());
}
示例3: receiveChunk
protected function receiveChunk($levelID, FullChunk $chunk)
{
if ($this->needsChunk[$levelID] !== null) {
if ($this->needsChunk[$levelID][0] === $chunk->getX() and $this->needsChunk[$levelID][1] === $chunk->getZ()) {
$this->needsChunk[$levelID] = $chunk;
}
}
//TODO: set new received chunks
}
示例4: writeChunk
public function writeChunk(FullChunk $chunk)
{
$this->saveChunk($chunk->getX() - $this->getX() * 32, $chunk->getZ() - $this->getZ() * 32, $chunk->toBinary());
}
示例5: onChunkChanged
public function onChunkChanged(FullChunk $chunk)
{
$this->loadQueue[\PHP_INT_SIZE === 8 ? ($chunk->getX() & 4294967295.0) << 32 | $chunk->getZ() & 4294967295.0 : $chunk->getX() . ":" . $chunk->getZ()] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
}
示例6: onChunkChanged
public function onChunkChanged(FullChunk $chunk)
{
$this->loadQueue[$chunk->getX() . ":" . $chunk->getZ()] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
}
示例7: onChunkChanged
public function onChunkChanged(FullChunk $chunk)
{
$this->loadQueue[($chunk->getX() & 0xffffffff) << 32 | $chunk->getZ() & 0xffffffff] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
}