ultrafastpregen-fabric-1.21.1-15.jar
Curse Maven Snippet
What's new
Ultra Fast Pregen 15 for Fabric 1.21.1
Requires Fabric Loader 0.14+, Minecraft 1.21.1, Java 21+ (Fabric API not needed). Server side only (works in singleplayer). Includes the fix of 14.1.
New
- Any radius, square or circle:
/pregen radius <blocks>,/pregen shape square|circleand/pregen startwithout a size;/pregen worldbordertakes the center and size from the world border,/pregen spawncenters on the world spawn. A circle generates every chunk whose center lies within the radius, and trees along its edge are not cut off. - Continues after a restart: a run cut short by a server stop or crash (not by
/pregen stop) continues by itself once the server has started again (resume_after_restart, on by default). After 3 restarts in a row without a saved batch it stops trying, so a crash cannot loop. - API for other mods: start, resume and stop runs and read their status; listen to a run's start, progress, every batch of saved chunks and its end; declare their own mixins compatible with the fast paths, or ask for Minecraft's terrain steps, in code or in
fabric.mod.json: https://github.com/Pongsapat3791/Ultra-Fast-Pregen/blob/main/API.md - Singleplayer without cheats: the world's owner can use
/pregenwithout turning cheats on; before, the command looked missing in such worlds. Servers and LAN guests still need op level 2. - Also for Bukkit servers and Sponge: version 15 is also out as a plugin for CraftBukkit, Spigot, Paper and Folia 26.2, and for SpongeVanilla 26.2.
Faster
- Surface rules: each chunk's surface step reads the biomes around it once, and the chunk's surface rules are built without the biome tests its biomes decide, so the rules for biomes that are not in the chunk no longer run for every block. The surface step takes about 16% less CPU time.
- Terrain noise shared at chunk edges: the columns of noise values on a chunk's edge belong to its neighbors too; the first chunk to compute one now leaves it for the others, where neither adds anything of its own there. The terrain step takes about 10% less time.
- Noise setup per chunk takes about half the time: each named function and spline of the noise router is built once per chunk.
- Surface and feature biomes: the surface step reads a column of blocks one section at a time; features look up each biome cell once per chunk.
- Lighting on all threads: each batch is lit on the worker threads, every tile of 8 × 8 chunks by its own copy of Minecraft's light engine: 1 to 3 s per batch instead of 12 to 23 s. Whole runs gain little from this alone, but a run of one batch, and the last batch of every run, finish sooner.
- Lithium and Canary keep the cell-skipping fill: their one change to the noise generator turned it off before.
- Like the fast paths before them, these steps turn themselves off where another mod changes the code they stand in for; in large modpacks that is often the case. The blocks and light stay Minecraft's.
Safer
- Stopping the server during a run: the server waits for the batch being saved (up to 20 s) and drops the one being generated, so the run continues from its last saved batch. In singleplayer, leaving the world now stops the run; before, it kept running after the world closed.
- A batch whose lighting or saving fails is generated again from what is saved, and the run continues. Before, the next batch was generated again instead, the failed batch was never saved, and the run ended "cancelled" with part of the area missing.
- Minecraft's way no longer makes the server generate chunks: with
parallel_steps=false, or after a failure on the fast paths, lookups that feature code makes through the world (a cat in a village looking for a witch hut) are answered from the batch. Before, the server could generate and keep up to 17 × 17 chunks there, and the next batches lost the features that reach into them. - Light engine: a batch dropped before its lighting (server stop) or generated again by the safety net no longer removes light data that the batch before it is still computing; that could hang the server.
- Fast paths no longer turned off at random: two worker threads reading the same mixin of another mod at once could make the check fail and turn a fast path off for a whole run. The checks now run one at a time.
Tested on this build
- The automated test suite passes: blocks, biomes and light identical to Minecraft's own generation (Overworld, Nether, End and the other world presets), batch edges, stopping and resuming, joining existing areas, circles, continuing after a server stop, the API, and the safety net, also for a batch whose lighting or saving fails.
- On a dedicated server, in the Overworld, Nether and End with every saved chunk checked: the mod alone; C2ME; Lithium; Lithium, ScalableLux, Noisium, FerriteCore, ModernFix; Distant Horizons; Terralith, Biomes O' Plenty, YUNG's Better Caves; all of them together. All passed, and the biomes matched Minecraft's own generation in every run. Moonrise: refused with a message, as intended (not supported yet).
Full results and the tested mod versions: https://github.com/Pongsapat3791/Ultra-Fast-Pregen/blob/main/COMPATIBILITY.md
This mod has no additional files

