| --- |
| license: mit |
| pretty_name: Minecraft Chunks |
| tags: |
| - minecraft |
| - terrain-generation |
| - voxel |
| - procedural-generation |
| - 3d |
| - games |
| task_categories: |
| - other |
| size_categories: |
| - 100M<n<1B |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: chunks/*.csv |
| --- |
| |
| # Minecraft Chunks |
|
|
| **2,040 full Minecraft chunks (~200 million voxels) exported block-by-block from vanilla 1.21 worlds**, collected to train [STEVE-1](https://huggingface.co/ghosteau/STEVE-1), a style-conditioned terrain-generation VAE. |
|
|
| Each CSV file is one complete chunk: a 16 x 384 x 16 voxel column from bedrock (Y = -64) to build limit (Y = 319), one row per voxel, 98,304 rows per file. |
|
|
| ## Schema |
|
|
| | Column | Type | Description | |
| |---|---|---| |
| | `x`, `z` | int | Block position within the chunk (0-15) | |
| | `y` | int | World height (-64 to 319) | |
| | `ChunkBiome` | str | Biome at the chunk's center column (one value per chunk) | |
| | `Biome` | str | Biome at this exact block | |
| | `Block_ID` | str | Bukkit material name (`STONE`, `GRASS_BLOCK`, `AIR`, ...) | |
| | `Is_Surface` | bool | Whether this block is the highest non-air block of its column | |
| | `Light_Level` | float | Light level at this block | |
| | `Block_to_Left` / `_Right` / `_Below` / `_Above` / `_in_Front` / `_Behind` | str | Material names of the 6 face-neighbours | |
|
|
| **A note on the context columns.** `Is_Surface`, `Light_Level`, and the six neighbour columns describe *the terrain itself*. They are included for analysis and visualisation, but if you train a terrain **generator**, do not condition on them -- at generation time they do not exist yet (that is data leakage, and it is exactly the mistake that motivated rebuilding this project's pipeline). A generator should condition only on position, biome, and noise. See the [training pipeline](https://github.com/ghosteau/generative-terrain) for the leakage-free reference implementation, including a unit test that enforces it. |
|
|
| ## Biome distribution |
|
|
| Chunk counts by `ChunkBiome` (2,040 total): |
|
|
| | Biome | Chunks | | Biome | Chunks | |
| |---|---|---|---|---| |
| | FOREST | 278 | | SUNFLOWER_PLAINS | 55 | |
| | PLAINS | 271 | | LUKEWARM_OCEAN | 54 | |
| | RIVER | 208 | | DESERT | 54 | |
| | DARK_FOREST | 194 | | BIRCH_FOREST | 45 | |
| | MANGROVE_SWAMP | 154 | | BAMBOO_JUNGLE | 38 | |
| | OLD_GROWTH_BIRCH_FOREST | 147 | | COLD_OCEAN | 30 | |
| | ERODED_BADLANDS | 112 | | SAVANNA | 30 | |
| | BADLANDS | 99 | | OCEAN | 11 | |
| | JUNGLE | 95 | | SWAMP | 5 | |
| | SPARSE_JUNGLE | 85 | | FLOWER_FOREST | 2 | |
| | BEACH | 72 | | TAIGA | 1 | |
| |
| The distribution is imbalanced (worlds are mostly forest and plains); the reference pipeline compensates with a biome-balanced sampler at training time. |
| |
| ## How it was collected |
| |
| A custom [PaperMC plugin](https://github.com/ghosteau/generative-terrain) reads chunks block-by-block on a live server and writes one CSV per chunk: |
| |
| - `/grabchunkdata` -- the current chunk |
| - `/grabchunkarea <radius>` -- every chunk in a square radius (bulk collection) |
| - `/grabbiome <biome> <count>` -- spiral-search targeted collection of rare biomes |
| - `/grabblock <block> <count>` -- targeted collection of chunks containing a block |
| |
| Filenames follow `<prefix>_<chunkX>_<chunkZ>.csv` (targeted collection inserts the biome or material name into the prefix). |
| |
| ## Usage |
| |
| **With the reference pipeline** (recommended -- this is the format its `GT_DATA_DIR` expects): |
| |
| ```python |
| from huggingface_hub import snapshot_download |
| |
| path = snapshot_download("ghosteau/minecraft-chunks", repo_type="dataset") |
| # then: set GT_DATA_DIR to <path>/chunks and run the training notebook |
| ``` |
| |
| **As a plain table:** |
| |
| ```python |
| from datasets import load_dataset |
|
|
| ds = load_dataset("ghosteau/minecraft-chunks") # ~200M rows |
| ``` |
| |
| **One chunk as a 3D array:** |
| |
| ```python |
| import numpy as np |
| import pandas as pd |
| |
| df = pd.read_csv("chunks/cluster1_-100_-1.csv") |
| grid = np.full((16, 384, 16), "", dtype=object) |
| grid[df["x"], df["y"] + 64, df["z"]] = df["Block_ID"] # [X, Y, Z] |
| ``` |
| |
| ## Related |
| |
| - Model trained on this data: [ghosteau/STEVE-1](https://huggingface.co/ghosteau/STEVE-1) |
| - Training pipeline, plugin source, and fine-tuning notebook: [github.com/ghosteau/generative-terrain](https://github.com/ghosteau/generative-terrain) |
| |
| ## License and attribution |
| |
| MIT. The data consists of block coordinates, material identifiers, and biome labels exported from procedurally generated Minecraft worlds. Not affiliated with or endorsed by Mojang or Microsoft; "Minecraft" is a trademark of Mojang Synergies AB. |
| |