mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
LevelDB: fixup extra-data handling, don't delete it - just don't read it
we'll need this once multi-layer block storages are implemented.
This commit is contained in:
parent
66963fbf9a
commit
9bc860f7a8
@ -397,6 +397,8 @@ class LevelDB extends BaseLevelProvider{
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: extra data should be converted into blockstorage layers (first they need to be implemented!)
|
||||
/*
|
||||
$extraData = [];
|
||||
if(($extraRawData = $this->db->get($index . self::TAG_BLOCK_EXTRA_DATA)) !== false and strlen($extraRawData) > 0){
|
||||
$binaryStream->setBuffer($extraRawData, 0);
|
||||
@ -406,7 +408,7 @@ class LevelDB extends BaseLevelProvider{
|
||||
$value = $binaryStream->getLShort();
|
||||
$extraData[$key] = $value;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$chunk = new Chunk(
|
||||
$chunkX,
|
||||
@ -415,8 +417,7 @@ class LevelDB extends BaseLevelProvider{
|
||||
$entities,
|
||||
$tiles,
|
||||
$biomeIds,
|
||||
$heightMap,
|
||||
$extraData
|
||||
$heightMap
|
||||
);
|
||||
|
||||
//TODO: tile ticks, biome states (?)
|
||||
@ -448,9 +449,6 @@ class LevelDB extends BaseLevelProvider{
|
||||
|
||||
$this->db->put($index . self::TAG_DATA_2D, pack("v*", ...$chunk->getHeightMapArray()) . $chunk->getBiomeIdArray());
|
||||
|
||||
//this has been superseded by multi-layer block storages in 1.2.14+
|
||||
$this->db->delete($index . self::TAG_BLOCK_EXTRA_DATA);
|
||||
|
||||
//TODO: use this properly
|
||||
$this->db->put($index . self::TAG_STATE_FINALISATION, chr(self::FINALISATION_DONE));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user