setSeed() 공개 메소드

public setSeed ( integer $seed )
$seed integer Integer to be used as seed.
예제 #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);
     }
 }
예제 #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);
 }