Skip to content

Layer diagrams

Export the workshop as five numbered grids of block sprites, covering Y=0 through Y=4. A JSON manifest ties each image to its global Y coordinate and records its diagnostics, so you can follow the layers even when a build sits above or below zero.

Download layers.py and workshop.schem, then run:

uv run --with mcschemora layers.py workshop.schem --output output/layers

The command confirms the number of layers and the manifest location:

Saved 5 layer diagrams and layers.json to output/layers

Sprite diagrams use bundled Wiki icons, so they do not download the native texture/model bundle. Imported Java blocks still need their catalogs.

Layer coordinates

Each region has local bounds. The script uses to_global(bounds.start) to find its bottom layer in the schematic, then walks from the lowest to the highest global Y coordinate. That includes empty gaps between regions, so check the vertical range before running it on a large build. Resolve conflicting region overlaps before rendering as well.

layers.py
import argparse
import json
from pathlib import Path

from mcschemora import Schematic


def main():
    parser = argparse.ArgumentParser(description="Export every global Y layer as a sprite diagram.")
    parser.add_argument("source", type=Path)
    parser.add_argument("--output", type=Path, default=Path("output/layers"))
    args = parser.parse_args()
    scene = Schematic.load(args.source, max_unpacked_bytes=64 * 1024 * 1024)
    ranges = []
    for name in scene.regions:
        region = scene.region(name)
        bounds = region.bounds
        if bounds is not None:
            start = region.to_global(bounds.start)[1]
            ranges.append((start, start + bounds.size[1]))
    if not ranges:
        parser.error("The schematic has no bounded regions.")
    args.output.mkdir(parents=True, exist_ok=True)
    layers = []
    for index, y in enumerate(
        range(min(start for start, _ in ranges), max(end for _, end in ranges))
    ):
        filename = f"layer-{index:03d}-y{y}.png"
        diagnostics = scene.export_sprites(args.output / filename, y=y, grid=True)
        layers.append({"y": y, "file": filename, "diagnostics": diagnostics})
    (args.output / "layers.json").write_text(json.dumps(layers, indent=2) + "\n")
    print(f"Saved {len(layers)} layer diagrams and layers.json to {args.output}")


if __name__ == "__main__":
    main()

Layer diagnostics describe omitted states and inventory details; retain the source schematic to preserve those fields. See rendering and blueprints for custom icons, cardinal views, and textured layer alternatives.

Workshop floor diagram at Y=0

Download all five layers and the manifest to inspect the guide.