Community listing page, reviews here may not be monitored by the author.
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Install on the client or the server; either alone gives full functionality.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
About
Description
DynPatcher
Dynamically compile and load Mixin patches from source at runtime.
User Guide
Overview
DynPatcher allows you to add or modify Fabric Mixins without recompiling the mod JAR. Source .java files placed in the patches directory are compiled at startup using an embedded Java compiler and registered with Mixin.
File Structure
When the game launches with DynPatcher installed, the following directory structure is created in your .minecraft/config/dynpatcher/ folder:
patches/: Place your Mixin.javasource files here. Subdirectories can be used to organize files.config.json: Mod configuration file..cache/: Internal directory containing compiled bytecode and the cache index. Do not modify manually.
Disabling Patches
To disable specific patches without removing the source files, list their relative paths under disabledPatches in config.json:
{
"disabledPatches": [
"example/MyMixin.java"
]
}
Paths are relative to the config/dynpatcher/patches/ directory.
Source File Handling
- Renamed files: If a
.javafile is renamed such that its filename no longer matches itspublic classdeclaration, DynPatcher removes thepublicmodifier in memory during compilation to avoid compiler errors. - Default package: If a
.javafile lacks apackagedeclaration, DynPatcher automatically remaps it todynpatcher.generatedin memory so Mixin can load it. - Environment filtering: Mixin classes can be annotated with
net.fabricmc.api.Environment(@Environment(EnvType.CLIENT)or@Environment(EnvType.SERVER)). Unannotated Mixins are loaded in all environments, while annotated Mixins are loaded only in their corresponding target environment (CLIENTorSERVER).
Caching
Compiled bytecode is cached in config/dynpatcher/.cache/. A source file is recompiled only if its content or timestamp changes, or if the installed mod version changes.
Developer Documentation
Architecture
DynPatcher executes during early startup as an IMixinConfigPlugin:
- Configuration & Discovery: Reads
config.jsonand scansconfig/dynpatcher/patches/for.javafiles, filtering out disabled patches. - Cache Resolution: Validates cached
.classfiles againstindex.jsonusing timestamp and SHA-256 content hashes. - Preprocessing: Reads stale or uncached sources, applying syntax adjustments (default package injection and
publicmodifier stripping) in memory. - Runtime Compilation: Compiles source objects in memory using the Eclipse Compiler for Java (ECJ).
- Bytecode Inspection & Patching: Uses ASM to inspect compiled classes for
net.fabricmc.api.Environmentannotations (filtering out Mixins incompatible with the current environment) and appendsremap = falseto Mixin annotations that do not specify a remapping preference. - Mixin Registration: Dynamically generates per-package Mixin JSON configurations and registers them via
Mixins.addConfiguration.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers