mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 01:14:10 +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{
|
public function networkSerialize() : string{
|
||||||
return str_repeat("\x00", 10240);
|
return "\x00" . str_repeat("\x00", 10240);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fastSerialize() : string{
|
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;
|
$count = 0;
|
||||||
$subChunks = "";
|
$subChunks = "";
|
||||||
foreach($chunk->subChunks as $y => $subChunk){
|
foreach($chunk->subChunks as $y => $subChunk){
|
||||||
if($subChunk->isEmpty()){
|
if($subChunk instanceof EmptySubChunk){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
++$count;
|
++$count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user