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