本文整理匯總了PHP中pocketmine\level\ChunkManager::getSeed方法的典型用法代碼示例。如果您正苦於以下問題:PHP ChunkManager::getSeed方法的具體用法?PHP ChunkManager::getSeed怎麽用?PHP ChunkManager::getSeed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pocketmine\level\ChunkManager
的用法示例。
在下文中一共展示了ChunkManager::getSeed方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: populateChunk
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: populateChunk
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);
}