{"record":{"id":"5d081721d39d3c07","repo":"Pumpkin-MC/Pumpkin","slug":"info-not-found","errorCode":null,"errorMessage":"Info not found!","messagePattern":"Info not found!","errorType":"error_code","errorClass":"WorldInfoError","httpStatus":null,"severity":"critical","filePath":"crates/pumpkin-world/src/world_info/mod.rs","lineNumber":365,"sourceCode":"    ) -> Self {\n        let mut data = Self::default(seed);\n        let spawn_pos = generator.find_spawn_position();\n        data.spawn_x = spawn_pos.0.x;\n        data.spawn_z = spawn_pos.0.z;\n        data\n    }\n\n    pub const fn set_pos(&mut self, x: i32, z: i32) {\n        self.spawn_x = x;\n        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() {","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-world/src/world_info/mod.rs#L347-L383","documentation":"WorldInfoError::InfoNotFound indicates that no world info could be located for the level folder — neither level.dat nor its backup yielded usable LevelData. The WorldInfoReader contract (world_info/mod.rs:21) returns this when the reader cannot find the world info store at all.","triggerScenarios":"WorldInfoReader::read_world_info is called on a directory that has no level.dat and no readable level.dat_old (e.g. an empty or wrong folder passed as the world path, or both files failed to load).","commonSituations":"Pointing the server at the wrong directory (parent folder instead of the world folder); a world folder that was created but never initialized; a wiped/corrupted world directory where both level.dat and level.dat_old were deleted.","solutions":["Verify the configured world path points at the actual world folder containing level.dat.","Restore level.dat from level.dat_old or a backup of the world.","If intentionally starting a new world, let the server create fresh world info instead of reading an uninitialized folder.","Check file permissions so an existing level.dat is actually readable (a permission failure can surface as not-found in the reader flow)."],"exampleFix":"// before: assuming the folder is a world\nlet level = reader.read_world_info(&args.path)?;\n// after: verify level.dat exists first\nif !args.path.join(\"level.dat\").is_file() {\n    bail!(\"{} is not a Minecraft world folder\", args.path.display());\n}\nlet level = reader.read_world_info(&args.path)?;","handlingStrategy":"validation","validationCode":"fn ensure_world_folder(path: &Path) -> Result<(), String> {\n    if !path.join(\"level.dat\").is_file() {\n        if path.join(\"level.dat_old\").is_file() {\n            std::fs::copy(path.join(\"level.dat_old\"), path.join(\"level.dat\")).map_err(|e| e.to_string())?;\n        } else {\n            return Err(format!(\"{} has no level.dat; not a world folder\", path.display()));\n        }\n    }\n    Ok(())\n}","typeGuard":"fn is_world_dir(path: &Path) -> bool {\n    path.join(\"level.dat\").is_file() || path.join(\"level.dat_old\").is_file()\n}","tryCatchPattern":"match reader.read_world_info(&path) {\n    Err(WorldInfoError::InfoNotFound) => {\n        eprintln!(\"no world info at {} — creating a new world\", path.display());\n        create_fresh_world(&path)?;\n    }\n    other => { other?; }\n}","preventionTips":["Point the server at the world folder itself, not its parent","Never delete both level.dat and level.dat_old","Restore from level.dat_old when level.dat is missing","Verify the world path in server config before startup"],"tags":["world-info","level-dat","not-found","world-loading"],"backgroundTag":"resource-not-found","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"}