Some fixes, thanks PhpStorm

This commit is contained in:
Dylan K. Taylor
2017-01-04 11:29:24 +00:00
parent 096836faaa
commit 1cb96d24ce
16 changed files with 28 additions and 20 deletions

View File

@ -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;

View File

@ -109,6 +109,8 @@ interface LevelProvider{
/**
* @param int $chunkX
* @param int $chunkZ
*
* @return bool
*/
public function saveChunk(int $chunkX, int $chunkZ) : bool;

View File

@ -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
*/

View File

@ -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()))