im using this code (inspirated from MineReset ) but it doesn't work :/ where is the problem? PHP: public function onRun(){ $chunkClass = $this->chunkClass; /** @var Chunk[] $chunks */ $chunks = unserialize($this->chunks); foreach($chunks as $hash => $binary){ $chunks[$hash] = $chunkClass::fromBinary($binary); } for($x = $this->pos1->x; $x <= $this->pos2->x; $x++){ for($z = $this->pos1->z; $z <= $this->pos2->z; $z++){ $hash = Level::chunkHash($x >> 4, $z >> 4); $chunk = null; if(isset($chunks[$hash])){ $chunk = $chunks[$hash]; } if($chunk !== null && $this->color){ $chunk->setBiomeColor($x, $z, 108, 151, 47); } for($y = $this->pos1->y; $y <= $this->pos2->y; $y++){ if($chunk !== null){ $id = $chunk->getBlockId($x, $y, $z); $meta = $chunk->getBlockData($x, $y, $z); switch($id){ case 126: $chunk->setBlock($x, $y, $z, 158, $meta); break; case 95: $chunk->setBlock($x, $y, $z, 20); break; case 188: $chunk->setBlock($x, $y, $z, Item::FENCE, 1); break; case 189: $chunk->setBlock($x, $y, $z, Item::FENCE, 2); break; case 190: $chunk->setBlock($x, $y, $z, Item::FENCE, 3); break; case 191: $chunk->setBlock($x, $y, $z, Item::FENCE, 4); break; case 192: $chunk->setBlock($x, $y, $z, Item::FENCE, 5); break; } } } } } $this->setResult($chunks); } public function onCompletion(Server $server) { $chunks = $this->getResult(); $level = $server->getLevel($this->levelId); if ($level != null) { foreach ($chunks as $hash => $chunk) { Level::getXZ($hash, $x, $z); $level->setChunk($x, $z, $chunk); } } }