mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Added Level->getChunks(), fixed some Doc Comments
This commit is contained in:
@@ -145,7 +145,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
/** @var Player[][] */
|
||||
protected $usedChunks = [];
|
||||
|
||||
/** @var Chunk[] */
|
||||
/** @var FullChunk[]|Chunk[] */
|
||||
protected $unloadQueue;
|
||||
|
||||
protected $time;
|
||||
@@ -153,7 +153,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
private $folderName;
|
||||
|
||||
/** @var Chunk[] */
|
||||
/** @var FullChunk[]|Chunk[] */
|
||||
private $chunks = [];
|
||||
|
||||
/** @var Block[][] */
|
||||
@@ -1724,6 +1724,13 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->getChunk($x >> 4, $z >> 4, true)->setHeightMap($x & 0x0f, $z & 0x0f, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FullChunk[]|Chunk[]
|
||||
*/
|
||||
public function getChunks(){
|
||||
return $this->chunks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Chunk object
|
||||
*
|
||||
@@ -1731,7 +1738,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
* @param int $z
|
||||
* @param bool $create Whether to generate the chunk if it does not exist
|
||||
*
|
||||
* @return Chunk
|
||||
* @return FullChunk|Chunk
|
||||
*/
|
||||
public function getChunk($x, $z, $create = false){
|
||||
if(isset($this->chunks[$index = Level::chunkHash($x, $z)])){
|
||||
@@ -1748,7 +1755,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
* @param int $z
|
||||
* @param bool $create
|
||||
*
|
||||
* @return Chunk
|
||||
* @return FullChunk|Chunk
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
|
@@ -106,7 +106,7 @@ interface LevelProvider{
|
||||
* @param int $Z absolute Chunk Z value
|
||||
* @param bool $create Whether to generate the chunk if it does not exist
|
||||
*
|
||||
* @return Chunk
|
||||
* @return FullChunk|Chunk
|
||||
*/
|
||||
public function getChunk($X, $Z, $create = false);
|
||||
|
||||
@@ -214,7 +214,7 @@ interface LevelProvider{
|
||||
public function setSpawn(Vector3 $pos);
|
||||
|
||||
/**
|
||||
* @return Chunk[]
|
||||
* @return FullChunk|Chunk[]
|
||||
*/
|
||||
public function getLoadedChunks();
|
||||
|
||||
|
Reference in New Issue
Block a user