mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Add missing byte, fix network sending issues, partly fixes #227
This commit is contained in:
parent
0bd7ea211d
commit
8a29e77f5e
@ -108,10 +108,10 @@ class EmptySubChunk extends SubChunk{
|
||||
}
|
||||
|
||||
public function networkSerialize() : string{
|
||||
return str_repeat("\x00", 10240);
|
||||
return "\x00" . str_repeat("\x00", 10240);
|
||||
}
|
||||
|
||||
public function fastSerialize() : string{
|
||||
return "";
|
||||
throw new \BadMethodCallException("Should not try to serialize empty subchunks");
|
||||
}
|
||||
}
|
@ -628,7 +628,7 @@ class GenericChunk implements Chunk{
|
||||
$count = 0;
|
||||
$subChunks = "";
|
||||
foreach($chunk->subChunks as $y => $subChunk){
|
||||
if($subChunk->isEmpty()){
|
||||
if($subChunk instanceof EmptySubChunk){
|
||||
continue;
|
||||
}
|
||||
++$count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user