mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +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 = [];
|
$extraData = [];
|
||||||
if(($extraRawData = $this->db->get($index . self::TAG_BLOCK_EXTRA_DATA)) !== false and strlen($extraRawData) > 0){
|
if(($extraRawData = $this->db->get($index . self::TAG_BLOCK_EXTRA_DATA)) !== false and strlen($extraRawData) > 0){
|
||||||
$binaryStream->setBuffer($extraRawData, 0);
|
$binaryStream->setBuffer($extraRawData, 0);
|
||||||
@ -406,7 +408,7 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
$value = $binaryStream->getLShort();
|
$value = $binaryStream->getLShort();
|
||||||
$extraData[$key] = $value;
|
$extraData[$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
$chunk = new Chunk(
|
$chunk = new Chunk(
|
||||||
$chunkX,
|
$chunkX,
|
||||||
@ -415,8 +417,7 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
$entities,
|
$entities,
|
||||||
$tiles,
|
$tiles,
|
||||||
$biomeIds,
|
$biomeIds,
|
||||||
$heightMap,
|
$heightMap
|
||||||
$extraData
|
|
||||||
);
|
);
|
||||||
|
|
||||||
//TODO: tile ticks, biome states (?)
|
//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->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
|
//TODO: use this properly
|
||||||
$this->db->put($index . self::TAG_STATE_FINALISATION, chr(self::FINALISATION_DONE));
|
$this->db->put($index . self::TAG_STATE_FINALISATION, chr(self::FINALISATION_DONE));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user