mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Fix heightmap crashes at the corner of chunks
Stupid unpack() return array indices start at 1, not 0 >_<
This commit is contained in:
parent
20c7e51077
commit
2ff565afe5
@ -181,7 +181,7 @@ class McRegion extends BaseLevelProvider{
|
|||||||
$heightMap = [];
|
$heightMap = [];
|
||||||
if(isset($chunk->HeightMap)){
|
if(isset($chunk->HeightMap)){
|
||||||
if($chunk->HeightMap instanceof ByteArrayTag){
|
if($chunk->HeightMap instanceof ByteArrayTag){
|
||||||
$heightMap = unpack("C*", $chunk->HeightMap->getValue());
|
$heightMap = array_values(unpack("C*", $chunk->HeightMap->getValue()));
|
||||||
}elseif($chunk->HeightMap instanceof IntArrayTag){
|
}elseif($chunk->HeightMap instanceof IntArrayTag){
|
||||||
$heightMap = $chunk->HeightMap->getValue(); #blameshoghicp
|
$heightMap = $chunk->HeightMap->getValue(); #blameshoghicp
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user