本文整理汇总了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());
}