Skip to content

1.21.3 Summary of Patches

embeddedt edited this page Oct 23, 2024 · 1 revision

mixin.bugfix.chunk_deadlock

Attempts to prevent chunk system deadlocks or provide additional debug information in the log when they occur. These deadlocks usually manifest as the server freezing indefinitely (e.g. entities not moving), while the client continues to work just fine.

mixin.bugfix.concurrency

The patches in this group fix concurrency-related issues within Minecraft and/or Forge. Most of them result in rare, hard-to-diagnose crashes during loading.

mixin.bugfix.fix_config_crashes

Fixes Forge configs occasionally becoming corrupted when launching the game.

mixin.bugfix.packet_leak

Experimental, not enabled by default. An attempted fix for the memory leak issue that occurs after playing long enough on 1.16.

mixin.bugfix.paper_chunk_patches

1.18 and newer. A key optimization. Ports a patch from Paper that fixes issues on 1.17 with chunkloading requiring huge amounts of memory and generating many CompletableFuture instances. 1.18+ are now able to load worlds on only 400MB of memory like 1.16 could.

mixin.bugfix.restore_old_dragon_movement

Fixes MC-272431, which tracks the ender dragon being unable to dive to the portal as it did in 1.13 and older. This causes the dragon to fly quite a bit differently from what modern players are used to and also patches out one-cycling, so it's not enabled by default. Thanks to Jukitsu for identifying the regression in the vanilla code.

mixin.bugfix.world_leaks

Reduces the memory usage of old client-side worlds that aren't needed after switching dimensions. These are normally garbage collected in vanilla, but mods sometimes retain references to them.

mixin.core

Core patches required for ModernFix to work

mixin.devenv

Patches used when running in a development environment, for speed improvement and/or testing

mixin.feature.branding

Adds ModernFix to the branding list on the title screen, and also to the F3 screen.

mixin.feature.direct_stack_trace

Normally off, can be enabled to force the raw stack trace to be dumped to the log when a crash occurs. Occasionally vanilla's crash report system fails to work properly and gives an entirely irrelevant stack trace/report.

mixin.feature.disable_unihex_font

Remove the Unicode font, saves 10MB but causes special characters to no longer render

mixin.feature.integrated_server_watchdog

Adds the vanilla watchdog to singleplayer worlds as well, but just prints out the stacktraces rather than forcefully terminating the world. This version includes the functionality of Fullstack Watchdog, but the latter is still needed for multiplayer.

mixin.feature.measure_time

Uses a couple injections to measure world load time, datapack reload time, resource reload time, bootstrap time, and adds the necessary hooks to enable vanilla's unused profiler logic for resource reloading if so configured.

mixin.feature.snapshot_easter_egg

Adds easter egg features (does not affect any vanilla visuals or behavior) when running on a snapshot version.

mixin.feature.spam_thread_dump

To be used for debugging purposes only. Causes a thread dump to be output to the log every 60 seconds. This can help to diagnose unexplained freezes during loading/gameplay.

mixin.feature.spark_profile_launch

If enabled, and a compatible version of Spark is installed, the entire launch sequence will be profiled until the main menu.

mixin.feature.stalled_chunk_load_detection

This option may help to detect the cause of chunkloading freezes. However, leaving it enabled may cause slightly worse performance.

mixin.feature.warn_missing_perf_mods

Shows a warning on startup if other performance mods considered essential and highly compatible are not present

mixin.perf.cache_blockstate_cache_arrays

All versions. Avoids creating fresh copies of enum arrays each time a blockstate cache is initialized. Minor optimization, but easy to do.

mixin.perf.cache_profile_texture_url

Avoids pointlessly creating a URL object and speeds up skull block rendering.

mixin.perf.cache_strongholds

All versions. Saves the generated list of stronghold positions with the world, instead of regenerating it on every world load. Saves a little bit of time on 1.16, and quite a bit more on 1.18 and 1.19.

mixin.perf.clear_fabric_mapping_tables

Reduces memory usage by clearing mapping data structures in Fabric Loader that are either redundant or rarely used by mods. Off by default for compatibility reasons.

mixin.perf.clear_mixin_classinfo

Force-loads all mixins when launch finishes and then clears out mixin data structures to remove most of Mixin's memory footprint. Disabled by default for compatibility reasons.

mixin.perf.compact_bit_storage

Fixes memory waste caused by some legacy servers (e.g. Hypixel) sending empty chunks as if they contain blocks. Reduces memory usage significantly on these servers.

mixin.perf.compact_mojang_registries

(Fabric) Experimental option that reduces the memory usage of registries by roughly 50%. Not useful in most modpacks unless they contain millions of blocks and items.

mixin.perf.dedicated_reload_executor

All versions. Moves resource pack and data pack reloading to a dedicated worker pool instead of using the default Worker-Main threads. This allows mods to Smooth Boot to still potentially improve singleplayer performance at runtime while not slowing down launch due to a limited thread count.

mixin.perf.deduplicate_climate_parameters

Deduplicates climate parameter objects used by the new biome system, can save ~2MB but also slows down datapack reload somewhat.

mixin.perf.deduplicate_location

All versions, but disabled by default due to load time impact. Deduplicates resource location namespaces and paths. This saves RAM but also increases the cost of constructing a new ResourceLocation by quite a bit.

mixin.perf.deduplicate_wall_shapes

Makes most wall blocks share the same shape object instead of each one having its own copy. Can reduce memory usage substantially when lots of wall blocks are added by mods.

mixin.perf.dynamic_entity_renderers

Constructs entity models the first time they are seen instead of during launch. Some mods are not compatible with this option and will cause EntityRenderer crashes.

mixin.perf.dynamic_resources

All versions. See https://github.com/embeddedt/ModernFix/wiki/Dynamic-Resources-FAQ.

mixin.perf.dynamic_sounds

All versions. Allows the game to unload sounds, instead of sounds indefinitely persisting after being loaded.

mixin.perf.dynamic_structure_manager

All versions. Allows the game to unload structure files after generation concludes instead of keeping them loaded forever.

mixin.perf.faster_command_suggestions

Mitigate lag when there are hundreds of thousands of suggestions while typing a command

mixin.perf.faster_item_rendering

All versions. Avoids rendering the sides of items in GUIs. (Yes, vanilla appears to do that.)

This can triple FPS with a mod like REI/JEI installed on weaker GPUs, if enough items are visible. Disabled by default since it's new and not tested much, but should be safe. The most likely issue is items being completely invisible in GUIs, or appearing flat in the world.

mixin.perf.faster_texture_stitching

All versions. Enables the game to use a faster texture stitching system originally written by SuperCoder79 for lwjgl3ify on 1.7.10, which can save some time during loading. Rarely, it's been reported to cause weird artifacts on blocks or in GUIs, this may be a Sodium bug.

mixin.perf.fix_loop_spin_waiting

Fixes Minecraft's built-in wait function consuming excessive amounts of CPU resources.

mixin.perf.model_optimizations

All versions. Implements optimizations to speed up the model loading process.

mixin.perf.mojang_registry_size

Fixes an issue causing registration of blocks/items to slow down proportional to the number already registered. This improves startup time.

mixin.perf.nbt_memory_usage

All versions. Uses a more efficient backing map for compound NBT tags that deduplicates key names and also uses an array map for very small compounds. This reduces the overhead of storing many compound tags in memory.

mixin.perf.remove_biome_temperature_cache

All versions. Removes the biome temperature cache as Lithium does on modern versions.

mixin.perf.resourcepacks

All versions. A key optimization. Launches on modern versions are heavily bottlenecked by filesystem access. Many requests are frequently made to resource packs to list resources or check if a given resource exists, and each of these result in a very slow file API call.

ModernFix completely eliminates most of the bottleneck here by simply caching a listing of all resources that exist within mod-provided and vanilla resourcepacks. The cache is rebuilt on resource reload (except for the vanilla resources, since they should never change while the game is running).

There are no known compatibility issues with this patch except for OptiFine (its CTM resources do not load correctly). However I do not recommend using OptiFine in any scenario, as it adds several minutes to launch time by itself and is not tested with ModernFix at all.

mixin.perf.state_definition_construct

All versions. Enabled only if FerriteCore is installed. Takes advantage of FerriteCore's handling of blockstates to speed up their creation. This can help speed up launch with mods that add lots of blockstates, such as furniture mods.

mixin.perf.thread_priorities

All versions. Adjusts the worker and server thread priorities to be lower than the client thread. This helps improve FPS stability on machines with few CPU cores, provided that the Java implementation in use respects priorities.

mixin.safety

Concurrency patches to prevent crashes during launch

Clone this wiki locally