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


PHP FullChunk::getZ方法代码示例

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


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

示例1: writeChunk

 public function writeChunk(FullChunk $chunk)
 {
     $this->lastUsed = \time();
     $chunkData = $chunk->toBinary();
     if ($chunkData !== \false) {
         $this->saveChunk($chunk->getX() - $this->getX() * 32, $chunk->getZ() - $this->getZ() * 32, $chunkData);
     }
 }
开发者ID:xpyctum,项目名称:PocketMinePlusPlus,代码行数:8,代码来源:RegionLoader__64bit.php

示例2: onChunkChanged

 public function onChunkChanged(FullChunk $chunk)
 {
     $this->loadQueue[Level::chunkHash($chunk->getX(), $chunk->getZ())] = abs(($this->x >> 4) - $chunk->getX()) + abs(($this->z >> 4) - $chunk->getZ());
 }
开发者ID:NewDelion,项目名称:PocketMine-0.13.x,代码行数:4,代码来源:Player.php

示例3: receiveChunk

 protected function receiveChunk($levelID, FullChunk $chunk)
 {
     if ($this->needsChunk[$levelID] !== null) {
         if ($this->needsChunk[$levelID][0] === $chunk->getX() and $this->needsChunk[$levelID][1] === $chunk->getZ()) {
             $this->needsChunk[$levelID] = $chunk;
         }
     }
     //TODO: set new received chunks
 }
开发者ID:boybook,项目名称:PocketMine-MP,代码行数:9,代码来源:GenerationManager.php

示例4: writeChunk

 public function writeChunk(FullChunk $chunk)
 {
     $this->saveChunk($chunk->getX() - $this->getX() * 32, $chunk->getZ() - $this->getZ() * 32, $chunk->toBinary());
 }
开发者ID:rryy,项目名称:PocketMine-MP,代码行数:4,代码来源:RegionLoader.php

示例5: onChunkChanged

 public function onChunkChanged(FullChunk $chunk)
 {
     $this->loadQueue[\PHP_INT_SIZE === 8 ? ($chunk->getX() & 4294967295.0) << 32 | $chunk->getZ() & 4294967295.0 : $chunk->getX() . ":" . $chunk->getZ()] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
 }
开发者ID:AASSuper,项目名称:PocketMine_0.13,代码行数:4,代码来源:Player.php

示例6: onChunkChanged

 public function onChunkChanged(FullChunk $chunk)
 {
     $this->loadQueue[$chunk->getX() . ":" . $chunk->getZ()] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
 }
开发者ID:xpyctum,项目名称:PocketMinePlusPlus,代码行数:4,代码来源:Player__32bit.php

示例7: onChunkChanged

 public function onChunkChanged(FullChunk $chunk)
 {
     $this->loadQueue[($chunk->getX() & 0xffffffff) << 32 | $chunk->getZ() & 0xffffffff] = \abs(($this->x >> 4) - $chunk->getX()) + \abs(($this->z >> 4) - $chunk->getZ());
 }
开发者ID:xpyctum,项目名称:PocketMinePlusPlus,代码行数:4,代码来源:Player__64bit.php


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