Back to mods
Dynamic Patcher project artwork

Modrinth · Minecraft mod

Dynamic Patcher

Dynamically compile and load Mixin patches from source at runtime.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Dynamic Patcher release matches 26.3?

Updated 3 months ago
beta file 1.0.0-beta.1
Game version 26.1, 26.1.1, 26.1.2
Loader Fabric

Dynamic Patcher 1.0.0-beta.1 targets 26.1, 26.1.1, 26.1.2 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is Dynamic Patcher required on the client, server, or both?

Installation on the client is optional. Installation on the dedicated server is optional.

Client Optional
Dedicated server Optional
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source marks this as usable on both the client and server.

What else does Dynamic Patcher 1.0.0-beta.1 need?

1.0.0-beta.1 on 26.3. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add Dynamic Patcher without breaking your instance.

Built for Dynamic Patcher 1.0.0-beta.1 on 26.3. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.0-beta.1. It targets 26.1, 26.1.1, 26.1.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Installation on the client is optional. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.0-beta.1. It opens that exact file at the source.

About this project

What does Dynamic Patcher add?

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 .java source 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 .java file is renamed such that its filename no longer matches its public class declaration, DynPatcher removes the public modifier in memory during compilation to avoid compiler errors.
  • Default package: If a .java file lacks a package declaration, DynPatcher automatically remaps it to dynpatcher.generated in 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 (CLIENT or SERVER).

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:

  1. Configuration & Discovery: Reads config.json and scans config/dynpatcher/patches/ for .java files, filtering out disabled patches.
  2. Cache Resolution: Validates cached .class files against index.json using timestamp and SHA-256 content hashes.
  3. Preprocessing: Reads stale or uncached sources, applying syntax adjustments (default package injection and public modifier stripping) in memory.
  4. Runtime Compilation: Compiles source objects in memory using the Eclipse Compiler for Java (ECJ).
  5. Bytecode Inspection & Patching: Uses ASM to inspect compiled classes for net.fabricmc.api.Environment annotations (filtering out Mixins incompatible with the current environment) and appends remap = false to Mixin annotations that do not specify a remapping preference.
  6. Mixin Registration: Dynamically generates per-package Mixin JSON configurations and registers them via Mixins.addConfiguration.

Project description from Modrinth.

Pick your setup

Dynamic Patcher by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

5 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Dynamic Patcher versions and loaders

1 of 1 releases match

Looking for an older file? The official Modrinth project page is in Resources.