Skip to content

About

不依赖任何模组、编辑器或游戏内工具,直接在 Minecraft Anvil 二进制区块层面进行体素级写入的程序化世界生成引擎。A procedural world generation engine that writes voxel-level data directly into Minecraft's Anvil binary chunk format — no mods, no in-game tools, no runtime dependencies.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VoxelGenesis — Procedural World Generation Engine for Minecraft 1.21.10

English | 简体中文

⚠️ Version Lock: This project targets Minecraft Java Edition 1.21.10 (DataVersion = 4556, protocol 773) specifically. The generator depends on the exact block IDs, block state properties, and NBT chunk format of this version. Compatibility with other versions is not guaranteed. To run on a different version, you must obtain the corresponding minecraft-server.jar and handle block renames, format differences, and other compatibility issues yourself.

A procedural world generation engine that writes voxel-level data directly into Minecraft's Anvil binary chunk format — no mods, no in-game tools, no runtime dependencies. Pure Python implementation; an end-to-end pipeline from a seed number to a playable save file with 100% byte-level determinism: repeated builds produce identical SHA-256 hashes.

An entire modern world is constructed on a canvas of tens of thousands of voxels — villa complexes, seaside parks, ocean cruise ships, supercar showrooms, underwater restaurants, and private vaults — all composed purely of block states, generating zero entities and zero armor stands. Every chandelier, every car, every sculpture is made of voxels.

Core Capabilities

  • Native Anvil I/O — Direct NBT serialization/deserialization and non-cross-boundary 64-bit chunk bit-packing, bypassing all intermediary tools and game runtime
  • Byte-Level Determinism — Fixed timestamps, gzip mtime=0, coordinate-hash deterministic RNG; two full builds produce zero-diff SHA-256 across all chunks
  • Triple Verification Pipeline — 1.21.10 NBT schema validation → 3D spatial connectivity walkability audit → full chunk readback comparison, ensuring zero-entity compliance

Directory Structure

├── README.md                          # This file (English)
├── README.zh-CN.md                    # Documentation (Chinese)
├── LICENSE                            # MIT License
├── .gitignore
├── generator_src/                     # Generator source code
│   ├── config.py                      # Coordinate bounds, elevation baselines, material palette
│   ├── nbt_mca.py                     # Pure-Python NBT read/write and chunk bit-packing
│   ├── world_canvas.py                # In-memory voxel canvas and global post-processing
│   ├── arch_lib.py                    # Parametric building component library
│   ├── zone_core_villa.py             # Core villa district
│   ├── zone_expansions.py             # Expansion zones (helipad, golf course, farm)
│   ├── zone_seaside_park.py           # Seaside park
│   ├── zone_cruise_ship.py            # Ocean cruise ship
│   ├── zone_v5_expansions.py          # V5 expansion zones
│   ├── zone_beach_park.py             # Seaside beach park
│   ├── zone_sports_complex.py         # Sports complex
│   ├── zone_urban_district.py         # Urban district
│   ├── generate_estate.py             # Master orchestrator
│   ├── verify_1_21_10_schema.py       # 1.21.10 NBT compliance validator
│   ├── audit_spatial_connectivity.py  # 3D spatial connectivity auditor
│   └── validate_and_render.py         # Full readback validation + rendering
├── tools/
│   ├── pregen_seed_world.py           # Pre-generate raw world template from a seed
│   ├── regen_snapshot.py              # Rebuild terrain snapshot for current canvas bounds
│   └── refresh_baseline.py            # End-to-end baseline refresh and archival
└── (build artifacts, not tracked)
    ├── seed_world/                    # Generated by tools/ script
    └── TEST_BUILDINGS/                # Generator output — the Minecraft save

Quick Start

Prerequisites

Dependency Version Purpose
Python 3.10+ Run the generator
matplotlib Any recent version Rendering script only
Java 21+ Seed world pre-generation only
minecraft-server.jar Official 1.21.10 Obtain yourself; not included

About the server jar: Obtain minecraft-server.jar from the Minecraft official server download page. The version must be 1.21.10. This file is excluded from the repository due to size and licensing. If you use a server jar for a different version, you are responsible for handling block ID renames, chunk format differences, and other compatibility issues.

Full Build Pipeline

# 0. Place the official minecraft-server.jar (1.21.10) into tools/

# 1. Pre-generate the raw world template from the seed (one-time; seed is built into the script)
python tools/pregen_seed_world.py --accept-eula --out ./seed_world

# 2. Copy the template as a working save
cp -r seed_world TEST_BUILDINGS          # Windows: Copy-Item -Recurse seed_world TEST_BUILDINGS

# 3. Run the generator
python generator_src/generate_estate.py ./TEST_BUILDINGS

# 4. Validate and render (optional)
python generator_src/verify_1_21_10_schema.py ./TEST_BUILDINGS
python generator_src/audit_spatial_connectivity.py ./TEST_BUILDINGS
python generator_src/validate_and_render.py ./TEST_BUILDINGS .

# 5. Play: copy TEST_BUILDINGS into .minecraft/saves/

Notes:

  • Step 1 is one-time; repeat steps 2–3 for idempotent rebuilds;
  • seed_world/ and TEST_BUILDINGS/ are artifacts, safe to delete at any time;
  • The generator only accepts world directories containing level.dat + region/.

Design Methodology

Determinism Guarantees

  • All .mca chunk headers use a fixed timestamp;
  • level.dat and playerdata/*.dat use gzip mtime=0;
  • A terrain snapshot preserves the pre-build surface elevation for idempotent re-runs;
  • All random number generators are bound to fixed seeds.

Five-Phase Build Order

Voxel primitives overwrite previously placed blocks; every multi-story building follows this strict execution order:

  1. Structural shell and floors — Fill floor slabs and exterior walls first, then install curtain walls
  2. Interior partitions, ceilings, and carpets — Lighting grids, bathrooms, carpets, and other interior fittings
  3. Vertical circulation — Stairs and towers must be built after all floors are in place
  4. Furniture and doors — Placed after room shells and stairs are complete
  5. Global post-processing — Double-door hinge normalization, glass pane/fence auto-connection, ambient light augmentation

Minecraft 1.21.10 Compliance

  • Block state auto-normalization (e.g., chain → iron_chain);
  • Non-cross-boundary 64-bit palette packing;
  • Zero entities, zero armor stands.

Extension Guidelines

  • Floor filling and door opening must always precede stair construction;
  • Stair step count must equal the floor height difference;
  • Double doors must use a dedicated function with hinges against the exterior wall;
  • Underwater structures require multi-layered underwater lighting;
  • Tree generation must pass collision protection — no embedding into buildings;
  • All randomness must use a fixed-seed RNG.

License & Acknowledgements

This project is open source under the MIT License. This is an original procedural generation tool. Minecraft is a trademark of Mojang AB. This project does not distribute Minecraft server binaries; users must obtain a legitimate copy themselves.

About

不依赖任何模组、编辑器或游戏内工具,直接在 Minecraft Anvil 二进制区块层面进行体素级写入的程序化世界生成引擎。A procedural world generation engine that writes voxel-level data directly into Minecraft's Anvil binary chunk format — no mods, no in-game tools, no runtime dependencies.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages