当前位置: 首页>>代码示例>>PHP>>正文


PHP Level::getSeed方法代码示例

本文整理汇总了PHP中pocketmine\level\Level::getSeed方法的典型用法代码示例。如果您正苦于以下问题:PHP Level::getSeed方法的具体用法?PHP Level::getSeed怎么用?PHP Level::getSeed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pocketmine\level\Level的用法示例。


在下文中一共展示了Level::getSeed方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(Level $level, Generator $generator)
 {
     $this->generator = get_class($generator);
     $this->settings = $generator->getSettings();
     $this->seed = $level->getSeed();
     $this->levelId = $level->getId();
 }
开发者ID:TexusDark,项目名称:Ananas-MP,代码行数:7,代码来源:GeneratorRegisterTask.php

示例2: __construct

 public function __construct(Level $level, Generator $generator)
 {
     $this->generator = get_class($generator);
     $this->waterHeight = $generator->getWaterHeight();
     $this->settings = serialize($generator->getSettings());
     $this->seed = $level->getSeed();
     $this->levelId = $level->getId();
 }
开发者ID:iTXTech,项目名称:Genisys,代码行数:8,代码来源:GeneratorRegisterTask.php

示例3: openLevel

 /**
  * @param Level  $level
  * @param string $generator
  * @param array  $options
  */
 public function openLevel(Level $level, $generator, array $options = [])
 {
     $buffer = chr(GenerationManager::PACKET_OPEN_LEVEL) . Binary::writeInt($level->getId()) . Binary::writeInt($level->getSeed()) . Binary::writeShort(strlen($generator)) . $generator . serialize($options);
     $this->generationThread->pushMainToThreadPacket($buffer);
 }
开发者ID:rryy,项目名称:PocketMine-MP,代码行数:10,代码来源:GenerationRequestManager.php

示例4: sendLevelInfo

 /**
  * @param CommandSender $sender
  * @param Level $level
  */
 public function sendLevelInfo(CommandSender $sender, Level $level)
 {
     $sender->sendMessage("Name: " . $level->getName());
     $sender->sendMessage("Id: " . $level->getId());
     $sender->sendMessage("Entities: " . count($level->getEntities()));
     $sender->sendMessage("Players: " . count($level->getPlayers()));
     $sender->sendMessage("Tiles: " . count($level->getTiles()));
     $sender->sendMessage("Chunks: " . count($level->getChunks()));
     $sender->sendMessage("Loaders: " . count($level->getLoaders()));
     $sender->sendMessage("Spawn: " . $level->getSafeSpawn()->getFloorX() . ":" . $level->getSafeSpawn()->getFloorY() . ":" . $level->getSafeSpawn()->getFloorZ());
     $sender->sendMessage("Time: " . $level->getTime());
     $sender->sendMessage("Tick-rate: " . $level->getTickRate());
     $sender->sendMessage("Tick-rate-time: " . $level->getTickRateTime());
     $sender->sendMessage("Seed: " . $level->getSeed());
     $sender->sendMessage("Is-auto-saving: " . ($level->getAutoSave() ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
     $sender->sendMessage("Is-generated: " . ($level->getServer()->isLevelGenerated($level->getName()) ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
     $sender->sendMessage("Is-loaded: " . ($level->getServer()->isLevelLoaded($level->getName()) ? TextFormat::GREEN . "yes" : TextFormat::RED . "no"));
 }
开发者ID:happyexceed,项目名称:PocketMine-Plugins-1,代码行数:22,代码来源:InfoFetcher.php

示例5: openLevel

 /**
  * @param Level  $level
  * @param string $generator
  * @param array  $options
  */
 public function openLevel(Level $level, $generator, array $options = [])
 {
     $this->generationManager->openLevel($level->getId(), $level->getSeed(), $generator, $options);
 }
开发者ID:rryy,项目名称:PocketMine-MP,代码行数:9,代码来源:GenerationInstanceManager.php

示例6: openLevel

 /**
  * @param Level  $level
  * @param string $generator
  * @param array  $options
  */
 public function openLevel(Level $level, $generator, array $options = [])
 {
     $buffer = \chr(GenerationManager::PACKET_OPEN_LEVEL) . \pack("N", $level->getId()) . \pack("N", $level->getSeed()) . \pack("n", \strlen($generator)) . $generator . \serialize($options);
     $this->generationThread->pushMainToThreadPacket($buffer);
 }
开发者ID:Edwardthedog2,项目名称:Steadfast2,代码行数:10,代码来源:GenerationRequestManager.php


注:本文中的pocketmine\level\Level::getSeed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。