{"record":{"id":"610010e13374d454","repo":"Pumpkin-MC/Pumpkin","slug":"the-chunk-isn-t-generated-yet","errorCode":null,"errorMessage":"The chunk isn't generated yet","messagePattern":"The chunk isn't generated yet","errorType":"error_code","errorClass":"ChunkParsingError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin-world/src/chunk/mod.rs","lineNumber":925,"sourceCode":"    #[must_use]\n    pub fn get_highest_non_empty_subchunk(&self) -> usize {\n        self.section\n            .block_sections\n            .read()\n            .unwrap_or_else(std::sync::PoisonError::into_inner)\n            .iter()\n            .enumerate()\n            .rev()\n            .find(|(_, sub)| !sub.has_only_air())\n            .map_or(0, |(idx, _)| idx)\n    }\n}\n\n#[derive(Error, Debug)]\npub enum ChunkParsingError {\n    #[error(\"Failed reading chunk status {0}\")]\n    FailedReadStatus(pumpkin_nbt::Error),\n    #[error(\"The chunk isn't generated yet\")]\n    ChunkNotGenerated,\n    #[error(\"Error deserializing chunk: {0}\")]\n    ErrorDeserializingChunk(String),\n}\n\n#[derive(Error, Debug)]\npub enum ChunkSerializingError {\n    #[error(\"Error serializing chunk: {0}\")]\n    ErrorSerializingChunk(pumpkin_nbt::Error),\n}\n\n#[cfg(test)]\nmod tests {\n    use super::ChunkSections;\n    use crate::chunk::palette::BlockPalette;\n    use pumpkin_data::{Block, block_properties::has_random_ticks};\n\n    #[test]","sourceCodeStart":907,"sourceCodeEnd":943,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-world/src/chunk/mod.rs#L907-L943","documentation":"Variant `ChunkNotGenerated` of `ChunkParsingError` in pumpkin-world. It signals that a parsed chunk's Status indicates the chunk has not yet been generated (e.g. status below `full`). The library throws it when code expects fully generated chunk data but the stored chunk is only a placeholder or partially generated.","triggerScenarios":"Loading a chunk whose NBT Status field is not `minecraft:full` (e.g. empty, structure_starts, features stages) when a fully generated chunk is required.","commonSituations":"Reading region files created by other tools that store pre-generated chunk shells; querying chunks before world generation completed; aborted world generation runs.","solutions":["Check the chunk status before requesting full chunk data and generate it if not `full`","Run/trust world generation to completion before consuming the chunk","Regenerate the ungenerated chunk rather than reading it directly"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// read Status NBT tag first; only request full chunk data when status == \"minecraft:full\"","typeGuard":"fn is_full(status: &str) -> bool { status == \"minecraft:full\" }","tryCatchPattern":"match load_chunk_data(pos) {\n    Err(ChunkParsingError::ChunkNotGenerated) => schedule_generation(pos),\n    other => other?,\n}","preventionTips":["Check chunk status before reading full chunk payloads","Let world generation finish before batch-processing chunks","When importing worlds, run generation upgrades to `full` first"],"tags":["chunks","world-generation","state"],"backgroundTag":"invalid-state-transition","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}