Skip to content

ElysiumAPI

BonsUnleashed edited this page Oct 10, 2026 · 3 revisions

ElysiumAPI

Minecraft 1.20.1 / Forge: this page documents that build and its measurements. For the separate 205-control Minecraft 1.21.1 port, see Minecraft 1.21.1 NeoForge.

One control for ElysiumAPI 1.1.3 (mod id elysium_api), a world-generation control: its biome replacer check runs without new lists, sets and random generators on every biome lookup. The switch carries a modified copy of ElysiumAPI's handler. The switch checks the code it would change against the tested build; another build is left untouched with one WARN line (see How the patches are applied).

Key Target Side Since Kind
elysium_lean_replacer ElysiumAPI 1.1.3 BOTH 1.0.36 opt

elysium_lean_replacer

Since: 1.0.36 · Target: ElysiumAPI 1.1.3 · Side: BOTH · Kind: opt

Mixins: ElysiumLeanHandlerMixin, MultiNoiseParametersInvoker

ElysiumAPI: the biome replacer check runs without throwaway objects. ElysiumAPI checks every biome lookup of a world generator for biome replacements. Each lookup asked the mod loader whether TerraBlender is installed, copied the data-driven replacer list into a new list, and created a HashSet and a new random generator (whose constructor touches one counter shared by every thread). Biome filling and Distant Horizons' world generation make thousands of lookups per chunk. The check now asks about TerraBlender once, reads the replacer list once per loaded world, and computes each seeded random number directly with java.util.Random's own formula; the replacers, their order, the seeds and the chosen biomes are unchanged, and the biome is still computed twice as before. ElysiumAPI is GPL-2.0 / LGPL-2.1; this is a modified version of its handler.

Idea: ours

Measured (Core Ultra 9 285K, 15 interleaved rounds): 860 -> 300 bytes per biome lookup with replacers (848 -> 352 without), time -2% (-8% where the climate sample is cheap); 120,000 lookups and 2,000,000 random numbers identical.

Since 1.0.38. Collections Of Optimizations 4.6 removes the ElysiumAPI mixin this switch works inside. The switch now steps aside when another mod does that, with one log line that names it. With 1.0.36 that combination stopped the game at start; set elysium_lean_replacer=false there.

Bons and Furious

Minecraft 1.20.1 / Forge 1.0.38

Compatibility

Controls by mod

Links

Clone this wiki locally