stevenarella icon indicating copy to clipboard operation
stevenarella copied to clipboard

world: cubic chunks support

Open PureTryOut opened this issue 3 years ago • 4 comments

I don't mean support for the mod necessarily, but support for loading chunks vertically so worlds higher than 256 blocks can be generated. The height limit in Minecraft always felt a bit limiting to me and I loved to play in the past with mods like CubicChunks to increase the world height and even generated the skylands and nether above and below the overworld.

It'd be awesome if Stevenarella supported chunk loading vertically as well early on. I'm not sure how it can be made so it stays compatible with vanilla Minecraft however, as I believe it would require changes to the world save format?

PureTryOut avatar Dec 15 '20 19:12 PureTryOut

i dont think stevenarella supports creating world and therefore has no world save format

Vresod avatar Dec 15 '20 21:12 Vresod

Not currently no, but I assume it will in the future?

PureTryOut avatar Dec 15 '20 21:12 PureTryOut

Cubic chunks support would be cool, but yeah the big problem is server-side support. This could be useful: https://github.com/OpenCubicChunks/CubicChunks (maybe enhance Stevenarella to recognize OpenCubicChunks chunk format?)

Currently definition of the the Chunk struct: https://github.com/iceiix/stevenarella/blob/master/src/world/mod.rs#L1210

pub struct Chunk {
    position: CPos,

    sections: [Option<Section>; 16],
    sections_rendered_on: [u32; 16],
    biomes: [u8; 16 * 16],

    heightmap: [u8; 16 * 16],
    heightmap_dirty: bool,

    block_entities: HashMap<Position, ecs::Entity, BuildHasherDefault<FNVHash>>,
}

stores an array of 16 chunk "sections" (16x16x16):


pub struct Section {
    pub cull_info: chunk_builder::CullInfo,
    pub render_buffer: render::ChunkBuffer,

    y: u8,

    blocks: storage::BlockStorage,

    block_light: nibble::Array,
    sky_light: nibble::Array,

    dirty: bool,
    building: bool,
}

cubic chunk support would entail expanding Chunk to support arbitrarily many sections (etc.), and loading vertically as well. How big are OpenCubicChunks chunks, 16x16x16? (or 32x32x32?)

iceiix avatar Dec 19 '20 19:12 iceiix

Based on this, the chunks in OpenCubicChunks are 16x16x16.

mpfaff avatar Jan 21 '21 18:01 mpfaff