getSeed() public method

Gets the level seed
public getSeed ( ) : integer | string
return integer | string
Exemplo n.º 1
0
 public function populateChunk($chunkX, $chunkZ)
 {
     $this->random->setSeed(0.0 ^ $chunkX << 8 ^ $chunkZ ^ $this->level->getSeed());
     foreach ($this->populators as $populator) {
         $populator->populate($this->level, $chunkX, $chunkZ, $this->random);
     }
 }
Exemplo n.º 2
0
 public function populateChunk($chunkX, $chunkZ)
 {
     $this->random->setSeed(0xdeadbeef ^ $chunkX << 8 ^ $chunkZ ^ $this->level->getSeed());
     foreach ($this->populators as $populator) {
         $populator->populate($this->level, $chunkX, $chunkZ, $this->random);
     }
     $chunk = $this->level->getChunk($chunkX, $chunkZ);
     $biome = Biome::getBiome($chunk->getBiomeId(7, 7));
     $biome->populateChunk($this->level, $chunkX, $chunkZ, $this->random);
 }