Pumpkin-MC/Pumpkin · error · ChunkParsingError

The chunk isn't generated yet

Error message

The chunk isn't generated yet

What it means

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.

Solutions

  1. Check the chunk status before requesting full chunk data and generate it if not `full`
  2. Run/trust world generation to completion before consuming the chunk
  3. Regenerate the ungenerated chunk rather than reading it directly
Defensive patterns

Strategy: validation

Validate before calling

// read Status NBT tag first; only request full chunk data when status == "minecraft:full"

Type guard

fn is_full(status: &str) -> bool { status == "minecraft:full" }

Try / catch

match load_chunk_data(pos) {
    Err(ChunkParsingError::ChunkNotGenerated) => schedule_generation(pos),
    other => other?,
}

Prevention

When it happens

Trigger: 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.

Common situations: Reading region files created by other tools that store pre-generated chunk shells; querying chunks before world generation completed; aborted world generation runs.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/610010e13374d454. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin-world/src/chunk/mod.rs:925

    #[must_use]
    pub fn get_highest_non_empty_subchunk(&self) -> usize {
        self.section
            .block_sections
            .read()
            .unwrap_or_else(std::sync::PoisonError::into_inner)
            .iter()
            .enumerate()
            .rev()
            .find(|(_, sub)| !sub.has_only_air())
            .map_or(0, |(idx, _)| idx)
    }
}

#[derive(Error, Debug)]
pub enum ChunkParsingError {
    #[error("Failed reading chunk status {0}")]
    FailedReadStatus(pumpkin_nbt::Error),
    #[error("The chunk isn't generated yet")]
    ChunkNotGenerated,
    #[error("Error deserializing chunk: {0}")]
    ErrorDeserializingChunk(String),
}

#[derive(Error, Debug)]
pub enum ChunkSerializingError {
    #[error("Error serializing chunk: {0}")]
    ErrorSerializingChunk(pumpkin_nbt::Error),
}

#[cfg(test)]
mod tests {
    use super::ChunkSections;
    use crate::chunk::palette::BlockPalette;
    use pumpkin_data::{Block, block_properties::has_random_ticks};

    #[test]

View on GitHub (pinned to 8d4639e25a)