{"record":{"id":"5a4936ce37d926b3","repo":"Pumpkin-MC/Pumpkin","slug":"unsupported-world-data-version-0","errorCode":null,"errorMessage":"Unsupported world data version: {0}","messagePattern":"Unsupported world data version: (.+?)","errorType":"error_code","errorClass":"WorldInfoError","httpStatus":null,"severity":"critical","filePath":"crates/pumpkin-world/src/world_info/mod.rs","lineNumber":375,"sourceCode":"        self.spawn_z = z;\n    }\n}\n\n#[derive(Error, Debug)]\npub enum WorldInfoError {\n    #[error(\"Io error: {0}\")]\n    IoError(std::io::ErrorKind),\n    #[error(\"Info not found!\")]\n    InfoNotFound,\n    #[error(\"Deserialization error: {0}\")]\n    DeserializationError(String),\n    #[error(\n        \"No world seed found: neither level.dat nor data/minecraft/world_gen_settings.dat contains one\"\n    )]\n    MissingWorldSeed,\n    #[error(\"Serialization error: {0}\")]\n    SerializationError(String),\n    #[error(\"Unsupported world data version: {0}\")]\n    UnsupportedDataVersion(i32),\n    #[error(\"Unsupported world level version: {0}\")]\n    UnsupportedLevelVersion(i32),\n}\n\nimpl From<std::io::Error> for WorldInfoError {\n    fn from(value: std::io::Error) -> Self {\n        match value.kind() {\n            std::io::ErrorKind::NotFound => Self::InfoNotFound,\n            value => Self::IoError(value),\n        }\n    }\n}\n","sourceCodeStart":357,"sourceCodeEnd":389,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-world/src/world_info/mod.rs#L357-L389","documentation":"WorldInfoError::UnsupportedDataVersion(i32) is returned when level.dat's DataVersion integer exists but lies outside the range MINIMUM_SUPPORTED_WORLD_DATA_VERSION..=MAXIMUM_SUPPORTED_WORLD_DATA_VERSION (checked in check_data_version, anvil.rs:40-57). It means the world was saved by a much newer or much older Minecraft version than this server supports.","triggerScenarios":"WorldInfoReader::read_world_info reads a level.dat whose 'Data'.'DataVersion' int is below the minimum (very old world) or above the maximum (world saved by a newer client/server release).","commonSituations":"Opening a world saved by the latest Minecraft snapshot in an older server build; loading a legacy world that predates the minimum supported DataVersion; server binary not yet updated after a Minecraft version bump.","solutions":["Update Pumpkin to a build whose MAXIMUM_SUPPORTED_WORLD_DATA_VERSION covers the world's DataVersion.","Downgrade/upgrade the world with a vanilla Minecraft client of the matching version before loading.","For very old worlds, run them through an intermediate Minecraft version chain to migrate DataVersion upward.","If you control the range check, confirm the world's DataVersion and extend the supported bounds only if the format is actually compatible."],"exampleFix":"// before: attempting to load a newer world on an old server\nlet level = reader.read_world_info(&path)?; // UnsupportedDataVersion(4189)\n// after: check compatibility up front\nlet dv = get_data_version(&path)?;\nassert!(dv <= MAXIMUM_SUPPORTED_WORLD_DATA_VERSION, \"update server for DataVersion {dv}\");","handlingStrategy":"validation","validationCode":"fn data_version_supported(path: &Path) -> Result<bool, String> {\n    let root = read_level_dat_root(path).map_err(|e| e.to_string())?;\n    let dv = root.get_compound(\"Data\")\n        .and_then(|d| d.get_int(\"DataVersion\"))\n        .ok_or(\"no DataVersion\")?;\n    Ok((MINIMUM_SUPPORTED_WORLD_DATA_VERSION..=MAXIMUM_SUPPORTED_WORLD_DATA_VERSION).contains(&dv))\n}","typeGuard":"fn supported_data_version(dv: i32) -> bool {\n    (MINIMUM_SUPPORTED_WORLD_DATA_VERSION..=MAXIMUM_SUPPORTED_WORLD_DATA_VERSION).contains(&dv)\n}","tryCatchPattern":"match reader.read_world_info(&path) {\n    Err(WorldInfoError::UnsupportedDataVersion(dv)) => {\n        bail!(\"world DataVersion {dv} unsupported — update the server or migrate the world\");\n    }\n    other => { other?; }\n}","preventionTips":["Pin server version to match the Minecraft version that saved the world","Migrate old worlds through intermediate vanilla versions before loading","Read the world's DataVersion with an NBT viewer before pointing a server at it","After a Minecraft version bump, update the server before loading existing worlds"],"tags":["world-info","data-version","compatibility","world-loading"],"backgroundTag":"value-out-of-range","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}