{"record":{"id":"f9252624cfd38460","repo":"Pumpkin-MC/Pumpkin","slug":"unsupported-world-level-version-0","errorCode":null,"errorMessage":"Unsupported world level version: {0}","messagePattern":"Unsupported world level version: (.+?)","errorType":"error_code","errorClass":"WorldInfoError","httpStatus":null,"severity":"critical","filePath":"crates/pumpkin-world/src/world_info/mod.rs","lineNumber":377,"sourceCode":"}\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":359,"sourceCodeEnd":389,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-world/src/world_info/mod.rs#L359-L389","documentation":"WorldInfoError::UnsupportedLevelVersion(i32) is returned when level.dat's 'version' (level format version) integer lies outside MINIMUM_SUPPORTED_LEVEL_VERSION..=MAXIMUM_SUPPORTED_LEVEL_VERSION, as checked by check_level_version (anvil.rs:59-75). Unlike DataVersion, this gates the on-disk level format version rather than the content data version.","triggerScenarios":"WorldInfoReader::read_world_info reads a level.dat whose 'Data'.'version' int is missing the supported range — e.g. a level format produced by a different Minecraft generation or a modified level.dat.","commonSituations":"Worlds converted between level formats by third-party tools; very old legacy worlds; hand-edited level.dat with a wrong 'version' tag; worlds from Minecraft versions the server doesn't support.","solutions":["Inspect level.dat's 'version' tag with an NBT viewer and compare against the server's supported level version range.","Migrate the world by loading and re-saving it in a vanilla client version whose level version is supported.","Restore level.dat from backup if the 'version' tag was accidentally edited or corrupted.","Update the server build if the world uses a newer level format than the current binary supports."],"exampleFix":"// before: loading a legacy world directly\nlet level = reader.read_world_info(&path)?; // UnsupportedLevelVersion(19133)\n// after: reject unsupported level versions with a clear message\nif !SUPPORTED_LEVEL_VERSIONS.contains(&lv) {\n    bail!(\"migrate world first; level version {lv} unsupported\");\n}\nlet level = reader.read_world_info(&path)?;","handlingStrategy":"validation","validationCode":"fn level_version_supported(path: &Path) -> Result<bool, String> {\n    let root = read_level_dat_root(path).map_err(|e| e.to_string())?;\n    let lv = root.get_compound(\"Data\")\n        .and_then(|d| d.get_int(\"version\"))\n        .ok_or(\"no version tag\")?;\n    Ok((MINIMUM_SUPPORTED_LEVEL_VERSION..=MAXIMUM_SUPPORTED_LEVEL_VERSION).contains(&lv))\n}","typeGuard":"fn supported_level_version(lv: i32) -> bool {\n    (MINIMUM_SUPPORTED_LEVEL_VERSION..=MAXIMUM_SUPPORTED_LEVEL_VERSION).contains(&lv)\n}","tryCatchPattern":"match reader.read_world_info(&path) {\n    Err(WorldInfoError::UnsupportedLevelVersion(lv)) => {\n        bail!(\"level format version {lv} unsupported — re-save the world in a supported vanilla version\");\n    }\n    other => { other?; }\n}","preventionTips":["Never hand-edit the 'version' tag in level.dat","Avoid third-party format converters that change the level version","Re-save converted worlds in a vanilla client of a supported version","Check the level 'version' tag alongside DataVersion before loading a world"],"tags":["world-info","level-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"}