Mixin Visualizer is an IntelliJ IDEA plugin that allows you to preview the effects of SpongePowered Mixins on target classes directly within the IDE.
Currently, the plugin implements a custom ASM transformer supporting:
- Merging:
- Fields (shadows handled partially)
- Unique methods
- @Overwrite: Full method replacement
- @Redirect:
- Method invocations (
INVOKE) - Field access (
GETFIELD/PUTFIELD)
- Method invocations (
- @Inject:
HEAD: Injection at the start.TAIL/RETURN: Injection before return statements.INVOKE: Injection before/after specific method calls (supportsshift).- Basic local variable remapping is implemented.
More to see: Mixin Documentation
The project is a Work In Progress, with the following planned features:
- Core transformation logic (ASM-based)
- UI features (Editor tabs, Diff view, Toolbar)
- Bytecode/Decompiler toggle
- Handle Shadow members (skip/validate them properly)
- Handle super calls
- More @At targets (support
FIELD,NEW, etc.) - Static inits (
<clinit>merging) - Exception handling (try-catch blocks in injections)
- Support 3rd party extensions:
- MixinExtras (WrapOperation, etc.)
- MixinSquared (button to see class transformed with MixinSquared)
- Improve code structure and error handling (refactor transformer code, please)
- Auto compile and refresh on file save (maybe settings to control this behavior)
- Syntax highlighting for bytecode/decompiler view
- Handle @Accessor and @Invoker
- Fix variable names
- Add mixin builder
- IntelliJ IDEA 2025.1.4.1+ (Community & Ultimate)
- Java 17+ && Java 21+
- Forge 1.20.1
- NeoForge 1.21.1
- Fabric 1.21.7
- Mixin 0.8.7+
- Install the plugin from the JetBrains Marketplace
- Open a project with Mixin usage.
- Open a class that is a Mixin target.
- Click the "Mixin Preview" button in the toolbar or use the shortcut
ALT-SHIFT-RIGHTto open the Mixin Visualizer tab. - Explore the transformed class in the new tab, using the Diff View to see changes.
Note: This plugin is not affiliated with SpongePowered.