This project procedurally generates a Bedrock Edition .mcstructure for an inverted floating magical library, then renders simple PNG previews by reading the generated structure file back from disk.
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python scripts\generate_inverted_library.py
python scripts\validate_mcstructure.py out\inverted_library.mcstructure
python scripts\test_coordinate_order.py
python scripts\render_structure_preview.py out\inverted_library.mcstructure out\previewsOutputs:
out/inverted_library.mcstructureout/previews/iso.pngout/previews/iso_close.pngout/previews/front.pngout/previews/side.pngout/previews/side_full.pngout/previews/top.pngout/previews/top_view.pngout/previews/cutaway.pngout/previews/cutaway_close.pngout/previews/roof_close.pngout/previews/interior_middle_cutaway.pngout/previews/interior_lower_cutaway.pngout/previews/lantern_debug_view.pngout/previews/interior_lower_top.pngout/previews/interior_middle_top.pngout/previews/interior_upper_top.pngout/previews/debug_spiral_deck.pngout/previews/debug_docking.pngout/previews/debug_cleanup_removed.pngout/previews/roof_cutaway.pngout/previews/side_bottom_close.pngout/previews/cutaway_bottom.pngout/previews/top_view_lower_spiral.pngout/previews/debug_lower_taper_only.png
The generator intentionally uses stable full blocks and simple Bedrock little-endian NBT:
- Size:
128 x 160 x 128 - Three open library floors with walkable surfaces at
y=45,y=73, andy=101 - Regular central atrium, ring corridors, landing pads, docking doorways, and two block-stair cores
- 2.5-turn spiral walkway from
y=34toy=104 - 26 hanging lanterns on branch arms around the outer spiral
- Ordered central crystal cluster from
y=50toy=108 - Layered oxidized copper spire from
y=108toy=154 - Inverted blue crystal pendant from
y=6toy=38
block_indices are written in Bedrock ZYX order:
index = x * size_y * size_z + y * size_z + zRun python scripts\test_coordinate_order.py to generate and verify out/coordinate_test.mcstructure.
The bundled preview renderer is a lightweight Pillow voxel renderer. It does not use Minecraft textures, but it color-codes bookshelves, stone, wood, copper, glowing blocks, and glass crystals so the silhouette can be checked quickly. The cutaway.png and cutaway_close.png views hide part of the front wall so the atrium and central crystal core are easier to inspect. The interior_*_top.png images show each library level from walk_y through walk_y + 8, making the atrium, ring corridor, docking entry, stairs, and bookshelf zones easier to audit. The generator also writes debug_spiral_deck.png, debug_docking.png, debug_cleanup_removed.png, roof_cutaway.png, and debug_lower_taper_only.png from its placement tags to verify walkway continuity, docking alignment, cleanup removals, the roof cavity, and the lower taper into the bottom crystal root. The renderer writes side_bottom_close.png, cutaway_bottom.png, and top_view_lower_spiral.png for bottom taper inspection.
You can also inspect out/inverted_library.mcstructure with MCStructure Preview for a more specialized external preview workflow.
Copy out/inverted_library.mcstructure into a world's structures folder. If the folder does not exist, create it.
Typical Windows Bedrock world path:
%LOCALAPPDATA%\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds\<world_id>\structures\
After copying the file, load the world and run:
/structure load inverted_library ~ ~ ~
The structure is 128 blocks wide and 160 blocks tall, so load it in open air with enough clearance.