Built with MCPyLib
Projects that use MCPyLib, and example scripts you can run on your server.
Map Art
MCPyLib Map Art turns an image into blocks that show it on an in-game map. A map pixel’s color depends on the block and on its height relative to the block north of it, so staircase mode varies heights to get 180 colors instead of a flat build’s 60.


How close each mode gets
| Mode | PSNR (dB) | SSIM | Mean error | Colors used |
|---|---|---|---|---|
| Flat | 17.19 | 0.9629 | 60.61 | 29 |
| Flat + dithering | 17.15 | 0.9430 | 60.91 | 36 |
| Staircase | 29.48 | 0.9757 | 4.17 | 65 |
| Staircase + dithering | 28.85 | 0.9584 | 4.59 | 99 |
Higher PSNR and SSIM and lower mean error are closer to the source. Measured with the project’s simulator on the logo above.
A color gradient through the modes



Block heights behind the picture

- Offline simulator that previews the result and reports PSNR and SSIM
- Perceptual color matching and Floyd–Steinberg dithering
- Command line, interactive menu and a tkinter GUI
Terrain
MCPyLib Terrain generates landscapes offline, then places them with chunk-sized edit() calls.
Shaded relief from the generator


- Heightmapridged multifractal noise, domain warping and tectonic uplift
- Erosionhydraulic droplets carve valleys, thermal erosion forms scree
- HydrologyD8 flow accumulation carves rivers and fills them with water
- Biomeseight bands from deep sea to snow peaks, with ores underground
- Placementchunk-based mc.edit() calls on a live server
Example scripts
From the repository’s examples folder. Each reads its token from a .env file.
build_cabin.py
examples/buildings/build_cabin.py
A 30 × 30 log cabin next to the player, with interior walls, a loft, stairs, furniture and a pitched roof.
fill()setblock()teleport()
build_maze.py
examples/buildings/build_maze.py
Generates a maze with depth-first search, with adjustable corridor and wall widths, and builds it in one edit() call.
fill()edit()setblock()
build_structures.py
examples/buildings/build_structures.py
Bulk-edit examples, each timed: a cube, a striped concrete tower, a house with a named chest and a sign, and a 50 × 50 platform built both ways.
edit()fill()
sand_cache_game.py
examples/games/sand_cache_game.py
A mini-game: a sealed stone-brick tower holds 20 to 60 sand blocks, with red sand always on top.
fill()setblock()
03_entity_control.py
examples/basics/03_entity_control.py
Summons a pig, a zombie and a villager, then freezes AI, teleports, sets velocity, targets and custom trades.
summon()setEntityAI()setVillagerTrades()
fill_vs_edit.py
examples/benchmarks/fill_vs_edit.py
The benchmark behind the performance numbers: fill() against edit() on five region sizes.
fill()edit()