mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Some fixes, thanks PhpStorm
This commit is contained in:
@ -61,6 +61,7 @@ interface Chunk{
|
||||
* @return int
|
||||
*/
|
||||
public function getHeight() : int;
|
||||
|
||||
/**
|
||||
* Gets block and meta in one go
|
||||
*
|
||||
@ -324,6 +325,7 @@ interface Chunk{
|
||||
/**
|
||||
* @param int $fY 0-15
|
||||
* @param SubChunk $subChunk
|
||||
* @param bool $allowEmpty
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@ -337,7 +339,7 @@ interface Chunk{
|
||||
/**
|
||||
* Returns the index of the highest non-empty subchunk
|
||||
*
|
||||
* @return bool
|
||||
* @return int
|
||||
*/
|
||||
public function getHighestSubChunkIndex() : int;
|
||||
|
||||
@ -363,6 +365,8 @@ interface Chunk{
|
||||
/**
|
||||
* Serializes a chunk without compression for use in AsyncTasks.
|
||||
*
|
||||
* @param Chunk $chunk
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function fastSerialize(Chunk $chunk) : string;
|
||||
|
@ -109,6 +109,8 @@ interface LevelProvider{
|
||||
/**
|
||||
* @param int $chunkX
|
||||
* @param int $chunkZ
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveChunk(int $chunkX, int $chunkZ) : bool;
|
||||
|
||||
|
@ -91,7 +91,7 @@ class GenericChunk implements Chunk{
|
||||
* @param CompoundTag[] $entities
|
||||
* @param CompoundTag[] $tiles
|
||||
* @param string $biomeIds
|
||||
* @param int[256] $heightMap
|
||||
* @param int[] $heightMap
|
||||
*/
|
||||
public function __construct($provider, int $chunkX, int $chunkZ, array $subChunks = [], array $entities = [], array $tiles = [], string $biomeIds = "", array $heightMap = []){
|
||||
$this->provider = $provider;
|
||||
@ -736,7 +736,7 @@ class GenericChunk implements Chunk{
|
||||
/**
|
||||
* Converts pre-MCPE-1.0 biome colour array to biome ID array. RIP BiomeColors :(
|
||||
*
|
||||
* @param int[256] $array of biome colour values
|
||||
* @param int[] $array of biome colour values
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -59,7 +59,7 @@ class Anvil extends McRegion{
|
||||
}
|
||||
$nbt->Sections[++$subChunks] = new CompoundTag(null, [
|
||||
"Y" => new ByteTag("Y", $y),
|
||||
"Blocks" => new ByteArrayTag("Blocks", GenericChunk::reorderByteArray($subChunk->getBlockIdArray())), //Generic in-memory chunks are currrently always XZY
|
||||
"Blocks" => new ByteArrayTag("Blocks", GenericChunk::reorderByteArray($subChunk->getBlockIdArray())), //Generic in-memory chunks are currently always XZY
|
||||
"Data" => new ByteArrayTag("Data", GenericChunk::reorderNibbleArray($subChunk->getBlockDataArray())),
|
||||
"SkyLight" => new ByteArrayTag("SkyLight", GenericChunk::reorderNibbleArray($subChunk->getSkyLightArray())),
|
||||
"BlockLight" => new ByteArrayTag("BlockLight", GenericChunk::reorderNibbleArray($subChunk->getBlockLightArray()))
|
||||
|
Reference in New Issue
Block a user