mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Mostly phase out EmptySubChunk
copy-on-write and zero-layer SubChunk objects are much easier to manage and have less cognitive overhead. obviously, the goal is to get rid of EmptySubChunk completely, but right now it does still serve a purpose (filling in dummy values for reading out-of-bounds on chunks), and that's a problem that takes a little more work to fix.
This commit is contained in:
@ -438,7 +438,7 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
|
||||
$subChunks = $chunk->getSubChunks();
|
||||
foreach($subChunks as $y => $subChunk){
|
||||
$key = $index . self::TAG_SUBCHUNK_PREFIX . chr($y);
|
||||
if($subChunk->isEmpty(false)){ //MCPE doesn't save light anymore as of 1.1
|
||||
if($subChunk->isEmptyAuthoritative()){
|
||||
$write->delete($key);
|
||||
}else{
|
||||
$subStream = new BinaryStream();
|
||||
|
Reference in New Issue
Block a user