public function __construct(Level $level, FullChunk $chunk) { $this->state = true; $this->levelId = $level->getId(); $this->chunk = $chunk->toFastBinary(); $this->chunkClass = get_class($chunk); }
public function __construct(Level $level, Generator $generator) { $this->generator = get_class($generator); $this->settings = $generator->getSettings(); $this->seed = $level->getSeed(); $this->levelId = $level->getId(); }
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; } }
public function __construct(Level $level) { $this->levelId = $level->getId(); }