Seed: 26829160 • (x: 0, y: 0) • Area: 1,044,848 blocks squared • Most Aesthetic Using Moderner Beta Alpha v1.1.2_01 Terrain on MC 1.21 • Distant Horizons • Bliss Shaders
🔥 Description
Monoliths are a terrain generation bug that happened in the ancient Minecraft Infdev through Alpha 1.1.2_01 versions. They are a rare, often large, flat and tall structures, almost entirely made of stone, with a hidden ocean of water until bedrock beneath them.
Hidden in plain sight for 15 years, I wanted to know how rare they actually are, and find the biggest one!
- This repository contains a brute-force search algorithm in Rust with a basic Python package for statistical analysis, alongside the most interesting findings of the journey.
- Feel free to contribute speed, documentation, cuda port improvements.
Warn: This is a side project, I may have time to port the readme to a mkdocs website in the future.
Note: For a more technical explanation, see kahomayo/monolith-renderer 😉
📦 Installation
Warning: The code will shred your cpu, make sure you have a good cooling solution, it may be unusable while running!
1. Stable releases
Install astral-sh/uv, open a terminal and run:
- Rust code:
uvx --from monolithium rustlith (commands) - Cuda code:
uvx --from monolithium cudalith (commands)
You can pass a --fast argument at the cost of accuracy for rust.
Note: The project creates large directories where you run it from - any of target, build, release.
2. Latest Git
Install the Rust programming language and git, open a terminal in some directory and run:
git clone https://github.com/Tremeschin/Monolithiumcd Monolithium && rustup default stablecargo run --release -- (commands)
You can pass any --features (name) explained in Cargo.toml for speedups
It's also possible to run directly with astral-sh/uv:
uvx --from git+https://github.com/Tremeschin/Monolithium (script) (commands)
Note: The project creates large directories where you run it from - any of target, build, release.
🔴 Find all Monoliths in a world
This will search a 8,388,608 blocks square in both positive X and Z directions. Note that all monoliths repeats every such value on any coordinate - there are 9 copies of each within the Far Lands on any given world!
rustlith find --seed 617
🟡 Find seeds with spawn monoliths
This will search for seeds that contains monoliths close to spawn.
- Search 0 through 100k seeds:
rustlith spawn linear -c 100000 - Search 50k random seeds:
rustlith spawn random -n 50000
🚀 Speeds
Monolithium is written in heavily parallelized Rust with the help of crates like Rayon for fearless concurrency and Ahash fast hashing, fully utilizing all available CPU resources one throws at it.
🦀 For a Ryzen 9 5900X 12c/24t, 2x3200 MT/s DDR4 CL16 2Rx8 system, one might expect:
- 3.75 minutes to find all monoliths in a seed, probing every 128 blocks.
- Search 1,150,000 seeds per second for spawn monoliths (approximated)
- Search 440,000 seeds per second for spawn monoliths (accurate)
Such speeds scales about linearly with your hardware - for better or worse!
⭐️ Showcase
Hall of fame for the timeline of computations:
Note: For sure throwing more CPU and/or Time at the code will break new records!
🔵 Largest monoliths near spawn
Note: The area calculation is within 2% error, nearby monoliths are part of the same complex.
🔵 Lowest seed visible from spawn
Drum rolls.. 617. This seed contains a visible Monolith from spawn 🤯
🔵 Monoliths repeat every 8,388,608 blocks
For every monolith in a world there's 9x exact copies of them within the Far Lands:
- A monolith at spawn appears on:
(-x, x) • ( 0, x) • ( x, x)(-x, 0) • ( 0, 0) • ( x, 0)(-x, -x) • ( 0, -x) • ( x, -x)
Sadly, the Far Lands override the monoliths, there's no such thing as a Far Monolith 😿
[!NOTE] For the keen among you, that value is
2**23- this happens for a couple of reasons:
- Ken Perlin's noise, unscaled, repeats every 256 units on any coordinate •
(2**8)- There are 16 octaves on the hill noise, each octave halves the previous frequency, so the highest one repeats every
(2**15)blocks (starting from multiplier 1).- Minecraft samples every 4 blocks, the depth scale is 100 but
& 0xFFtruncations cancels it at2**20Multiplying factors,2**(8+15) = 2**23
🔵 How rare are they?
Spoiler: Not much, certain seeds are more likely to generate monoliths (anthropic principle confirmed?), but most contains at least half a million monolith complexes within the Far Lands (12,550,824 blocks squared).
🔎 Future work
- Investigate the correlation of Perlin coefficients to the likeliness and size of Monoliths.
- Is it more efficient for CUDA to stream perlin coefficients than inline JavaRNG on CPU?
- Make statistical analysis (Average size, Distribution) of Monoliths in seeds.
- Make a
HashMap<(int, int), Monolith>to avoid recomputing areas - Throw 2x Epyc 9965 at the code. I have a spare one for sure iirc.
♻️ Credits
- User @kahomayo for
monolith-rendererto understand the underlying mathematics. - YouTuber @AntVenom For the Breaking Minecraft playlist inspiration.