Repository navigation
ModernFix
Minecraft 1.20.1 / Forge: this page documents that build and its measurements. For the separate 170-control Minecraft 1.21.1 port, see Minecraft 1.21.1 NeoForge.
Four controls for ModernFix 5.27.77 (mod id modernfix): the stronghold position cache is given back while C2ME is installed, the model-location set is walked in order, each cube definition remembers the cube ModernFix shares for it, and JEI's creative tabs are counted with a hash index. How an option is given back is explained on Radium Re-Reforged. Every 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 |
|---|---|---|---|---|
modernfix_bake_location_order |
ModernFix 5.27.77 | CLIENT | 1.0.30 | opt |
modernfix_c2me_cache_strongholds |
ModernFix 5.27.77 with C2ME 0.2.0+alpha.12 | BOTH | 1.0.22 | opt |
modernfix_cube_bake_memo |
ModernFix 5.27.77 (compact_entity_models) | CLIENT | 1.0.30 | opt |
modernfix_represented_tabs_index |
ModernFix 5.27.77 with JEI 15.59.0.212 | CLIENT | 1.0.30 | opt |
Since: 1.0.22 · Side: BOTH · Mixin: StrongholdCacheOptionTrigger
Patched: ModernFix's mixin.perf.cache_strongholds option (no method of ModernFix's is changed)
What upstream did. ModernFix switches off its stronghold position cache whenever C2ME is installed. That cache stores the concentric-ring (stronghold) positions of each dimension in the world folder, so a world load reads them instead of searching biomes for every ring position again.
What the patch does. C2ME 0.2.0+alpha.12 does not touch ring placement in any of its 20 module jars, so with exactly that C2ME build (version-pinned at runtime) the cache is switched back on; with another C2ME version, or when C2ME was not the only reason, it stays off. Nothing changes without C2ME (the cache is already on then).
What stays the same. The positions: the cache is ModernFix's own code with ModernFix's own invalidation.
Measured. With C2ME installed, every ring set of every level was read from the cache ("Using cached stronghold positions" × 10). A miss costs about 5 s of ring search per 128-position set at world load (four sets per load in the pack this was built for). Load-time only.
Since: 1.0.30 · Target: ModernFix 5.27.77 · Side: CLIENT · Kind: opt
Mixin: LocationOrderMixin
ModernFix model-location set walked in order. On every resource load (game start, F3+T, resource pack changes) ModernFix shows the mods' model-bake handlers a list of every model location in the game, about 2.4 million here, kept in a linked hash set. Several mods walk all of it (Alex's Mobs, MrCrayfish's Furniture, Mekanism, Refined Storage), and walking that set means jumping through 48 MB of tables, two cache misses per entry: 0.35 to 0.6 s per mod at start-up. Now the same set also remembers its entries in the order they went in, and a walk reads that list instead. It is still the very same set (adds, lookups, sizes are its own), the walk returns the same entries in the same order, and if anything ever changed the set other than an add, it simply walks the old way again.
Idea: found in our own launch profile (ModernFix's emulated bake event, 6.6 s); no outside mod
Measured: offline, 2,700,159 checks identical (ModernFix's own bake helper and every registry view switch on and off, 120,000 random set operations, 2.3 million entries); one full walk over 2.25 million entries 350 -> 19 ms, the mods' own walks 333-816 -> 21-346 ms (about 1.5 s less per resource load, measured with the game's garbage collector).
Since: 1.0.30 · Target: ModernFix 5.27.77 (compact_entity_models) · Side: CLIENT · Kind: opt
Mixin: CubeBakeMemoMixin
ModernFix: each cube definition remembers the cube ModernFix shares for it. ModernFix already gives every bake of the same cube the same shared cube object, but to find it, it built a 15-value key (with 13 boxed numbers) and hashed and compared all of it for every cube on every bake. Each cube definition now remembers the cube it was given, with the texture size and the values that can change (its position, size and visible faces), and hands it back while they are unchanged: the very object ModernFix would find. Any change goes through ModernFix again. It stays off without ModernFix's cube sharing. One rare difference inside the game: if two threads bake equal cubes for the very first time at the same moment, ModernFix ends up with two equal cubes and this switch may keep handing out the other one; they are identical geometry, so nothing looks different. -Dbons_and_furious.modernfixCubeBakeMemo.shadow=true asks ModernFix every time and logs any other object (for testing).
Measured: offline on all 257 vanilla and armour layers, the same cube objects as ModernFix hands out, also after positions, sizes and face sets were changed in place; with vanilla_layer_bake_streamless 6.2 -> 1.3 us and 7.6 -> 2.4 KB per layer bake, and 6.9 -> 1.3 us and 11.5 -> 2.4 KB against the unchanged game code (median of 7 rounds).
Since: 1.0.30 · Target: ModernFix 5.27.77 with JEI 15.59.0.212 · Side: CLIENT · Kind: opt
Mixin: RepresentedTabsIndexMixin
ModernFix: JEI's represented creative tabs are counted with a hash index. With ModernFix's JEI-backed creative search, the first search inside a creative tab with a search bar (once per JEI session) decides which tabs JEI represents by asking, for every JEI item stack and every creative tab, whether the tab's items contain it: tens of thousands of stacks times every tab, each check hashing the item and its NBT. Now one pass records which tabs hold an item stack with a given hash, and the same check runs, in the same order, only where it can find a match: a stack can only equal an element with the same hash. Same counts, same result. Tabs whose item set is not vanilla's own kind, and empty stacks, get the full check as before. -Dbons_and_furious.modernfixRepresentedTabsIndex.shadow=true counts both ways and logs any difference (for testing).
Measured: offline on ModernFix's own method with 163 creative tabs (31,000 items) and 30,000 JEI stacks, counts identical for the full scene, 60 random sub-scenes and a tab changed during the count, and the same represented tabs; 2.8% of the checks are still needed; 899 -> 176 ms for the one-time count (median of 5 rounds).
Bons and Furious is licensed GPL-3.0-only with upstream notices retained. Target mod names identify compatibility targets and do not imply endorsement; their code, assets and licenses remain their authors' property. All measurements on this wiki are focused method, phase or reproduction measurements from the pack the mod was built for, taken on the historical build named in each entry; they are not whole-game FPS or TPS promises and are not additive.
Bons and Furious
Minecraft 1.20.1 / Forge 1.0.34
- Home
- Installation and configuration
- How the patches are applied
- All controls
- Measurements and caveats
- Whole-modpack benchmark
- Troubleshooting and log messages
- Generation context fixes
- Version history
Compatibility
- Compatibility
- Known conflicts and workarounds
- Tested mod list
- Redundant mods
- Compatibility and target versions
Controls by mod
- Minecraft (51)
- Forge (6)
- Ad Astra (1)
- Alex's Caves (4)
- Alex's Mobs (2)
- Almost Unified (1)
- AmbientSounds (3)
- Architectury API (1)
- Ars Nouveau (2)
- Artifacts (1)
- Better Combat (1)
- Bosses of Mass Destruction (1)
- Butterflies (1)
- ChunkSending (1)
- CIT Reforged (1)
- Citadel (1)
- CoFH Core (1)
- Colorwheel (1)
- Cooking for Blockheads (1)
- Create (4)
- Critters and Companions (1)
- Cryptic Foes (2)
- Cucumber (1)
- Curios API (6)
- Distant Horizons (17)
- Dungeons Delight (1)
- Dynamic Trees (2)
- Embeddium (13)
- Entity Model Features (4)
- Entity Texture Features (1)
- EntityCulling (1)
- FancyMenu (1)
- Farmer's Delight (2)
- FD Bosses (2)
- Fowl Play (2)
- Fusion (2)
- GeckoLib (5)
- Goblins Tyranny (2)
- Hostile Villages (2)
- Ice and Fire (6)
- ImmediatelyFast (3)
- Immersive Engineering (1)
- Jaden's Nether Expansion (1)
- JEI (7)
- Kiwi (1)
- L2 Library (2)
- Legendary Monsters (1)
- Lionfish API (2)
- ModernFix (4)
- Mowzie's Mobs (1)
- Mutant Monsters (1)
- Nether Depths Upgrade (1)
- Occult (1)
- Oculus (12)
- Oh The Biomes We've Gone (1)
- Particular (1)
- Pehkui (1)
- Pipez (2)
- Placebo (1)
- Presence Footsteps (1)
- Radium Re-Reforged (8)
- Regions Unexplored (1)
- Relics (2)
- Ribbits (1)
- Ryoamic Lights (2)
- Sake's Structures (1)
- Scorched (1)
- Scuba Gear (1)
- Simply Swords (1)
- SlashBlade: Resharped (1)
- Slice & Dice (1)
- Spawn (4)
- Storage Drawers (2)
- Structure Gel API (1)
- Structurify (3)
- TaCZ (2)
- TerraBlender (2)
- Terramity (1)
- Under the Moon (1)
- Valkyrien Skies (15)
- Trackwork model repair
- Living Engineering (moved out in 1.0.20)
Links