add Chunk.encodeV2, decodeV2
This commit is contained in:
@@ -161,7 +161,7 @@ void WorldConverter::upgradeRegion(
|
||||
) const {
|
||||
auto path = wfile->getRegions().getRegionFilePath(layer, x, z);
|
||||
auto bytes = files::read_bytes_buffer(path);
|
||||
auto buffer = compatibility::convertRegion2to3(bytes, layer);
|
||||
auto buffer = compatibility::convert_region_2to3(bytes, layer);
|
||||
files::write_bytes(path, buffer.data(), buffer.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ static util::Buffer<ubyte> convert_voxels_1to2(const ubyte* buffer, uint32_t siz
|
||||
return util::Buffer<ubyte>(std::move(compressed), outLen);
|
||||
}
|
||||
|
||||
util::Buffer<ubyte> compatibility::convertRegion2to3(
|
||||
util::Buffer<ubyte> compatibility::convert_region_2to3(
|
||||
const util::Buffer<ubyte>& src, RegionLayerIndex layer
|
||||
) {
|
||||
const size_t REGION_CHUNKS = 1024;
|
||||
|
||||
@@ -9,6 +9,6 @@ namespace compatibility {
|
||||
/// @see /doc/specs/region_file_spec.md
|
||||
/// @param src region file source content
|
||||
/// @return new region file content
|
||||
util::Buffer<ubyte> convertRegion2to3(
|
||||
util::Buffer<ubyte> convert_region_2to3(
|
||||
const util::Buffer<ubyte>& src, RegionLayerIndex layer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user