當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。