本文整理汇总了PHP中pocketmine\level\format\FullChunk::toFastBinary方法的典型用法代码示例。如果您正苦于以下问题:PHP FullChunk::toFastBinary方法的具体用法?PHP FullChunk::toFastBinary怎么用?PHP FullChunk::toFastBinary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\level\format\FullChunk
的用法示例。
在下文中一共展示了FullChunk::toFastBinary方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(Level $level, FullChunk $chunk)
{
$this->state = true;
$this->levelId = $level->getId();
$this->chunk = $chunk->toFastBinary();
$this->chunkClass = get_class($chunk);
}
示例2: __construct
public function __construct(Level $level, FullChunk $chunk)
{
$this->state = true;
$this->levelId = $level->getId();
$this->chunk = $chunk->toFastBinary();
$this->chunkClass = get_class($chunk);
$this->chunk00 = $level->getChunk($chunk->getX() - 1, $chunk->getZ() - 1, true)->toFastBinary();
$this->chunk01 = $level->getChunk($chunk->getX() - 1, $chunk->getZ(), true)->toFastBinary();
$this->chunk02 = $level->getChunk($chunk->getX() - 1, $chunk->getZ() + 1, true)->toFastBinary();
$this->chunk10 = $level->getChunk($chunk->getX(), $chunk->getZ() - 1, true)->toFastBinary();
$this->chunk12 = $level->getChunk($chunk->getX(), $chunk->getZ() + 1, true)->toFastBinary();
$this->chunk20 = $level->getChunk($chunk->getX() + 1, $chunk->getZ() - 1, true)->toFastBinary();
$this->chunk21 = $level->getChunk($chunk->getX() + 1, $chunk->getZ(), true)->toFastBinary();
$this->chunk22 = $level->getChunk($chunk->getX() + 1, $chunk->getZ() + 1, true)->toFastBinary();
}
示例3: __construct
public function __construct(Level $level, FullChunk $chunk)
{
$this->state = \true;
$this->levelId = $level->getId();
$this->chunk = $chunk->toFastBinary();
$this->chunkClass = \get_class($chunk);
for ($i = 0; $i < 9; ++$i) {
if ($i === 4) {
continue;
}
$xx = -1 + $i % 3;
$zz = -1 + (int) ($i / 3);
$ck = $level->getChunk($chunk->getX() + $xx, $chunk->getZ() + $zz, \false);
$this->{"chunk{$i}"} = $ck !== \null ? $ck->toFastBinary() : \null;
}
}