ÂInsert PM data version into blockstates, chunks, entities, tiles and level.dat

this information will allow us to correct for any bugs introduced by past versions.

however, we still need to propagate this information to permit actually using it when loading data.
This commit is contained in:
Dylan K. Taylor
2023-05-29 16:32:24 +01:00
parent 7f1550ef04
commit f5a1a0c9cb
10 changed files with 42 additions and 3 deletions

View File

@ -35,6 +35,21 @@ final class VersionInfo{
public const IS_DEVELOPMENT_BUILD = true;
public const BUILD_CHANNEL = "beta";
/**
* PocketMine-MP-specific version ID for world data. Used to determine what fixes need to be applied to old world
* data (e.g. stuff saved wrongly by past versions).
* This version supplements the Minecraft vanilla world version.
*
* This should be bumped if any **non-Mojang** BC-breaking change or bug fix is made to world save data of any kind
* (entities, tiles, blocks, biomes etc.). For example, if PM accidentally saved a block with its facing value
* swapped, we would bump this, but not if Mojang did the same change.
*/
public const WORLD_DATA_VERSION = 1;
/**
* Name of the NBT tag used to store the world data version.
*/
public const TAG_WORLD_DATA_VERSION = "PMMPDataVersion"; //TAG_Long
private function __construct(){
//NOOP
}