mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 23:15:29 +00:00
Formatting and doc comments, overall useless commit
This commit is contained in:
parent
42b78cfba2
commit
6ea45c5c4a
@ -620,7 +620,8 @@ class GenericChunk implements Chunk{
|
|||||||
}
|
}
|
||||||
$result .= pack("v*", ...$this->heightMap)
|
$result .= pack("v*", ...$this->heightMap)
|
||||||
. $this->biomeIds
|
. $this->biomeIds
|
||||||
. chr(0); //border block array count (TODO)
|
. chr(0); //border block array count
|
||||||
|
//Border block entry format: 1 byte (4 bits X, 4 bits Z). These are however useless since they crash the regular client.
|
||||||
|
|
||||||
$extraData = new BinaryStream();
|
$extraData = new BinaryStream();
|
||||||
$extraData->putVarInt(count($this->extraData)); //WHY, Mojang, WHY
|
$extraData->putVarInt(count($this->extraData)); //WHY, Mojang, WHY
|
||||||
@ -695,6 +696,7 @@ class GenericChunk implements Chunk{
|
|||||||
return $chunk;
|
return $chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: get rid of this
|
||||||
public static function getEmptyChunk(int $x, int $z, LevelProvider $provider = null) : Chunk{
|
public static function getEmptyChunk(int $x, int $z, LevelProvider $provider = null) : Chunk{
|
||||||
return new GenericChunk($provider, $x, $z);
|
return new GenericChunk($provider, $x, $z);
|
||||||
}
|
}
|
||||||
@ -750,6 +752,13 @@ class GenericChunk implements Chunk{
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts pre-MCPE-1.0 biome colour array to biome ID array. RIP BiomeColors :(
|
||||||
|
*
|
||||||
|
* @param int[256] $array of biome colour values
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public static function convertBiomeColours(array $array) : string{
|
public static function convertBiomeColours(array $array) : string{
|
||||||
$result = str_repeat("\x00", 256);
|
$result = str_repeat("\x00", 256);
|
||||||
foreach($array as $i => $colour){
|
foreach($array as $i => $colour){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user