Skip to content

IntelliJ IDEA plugin for visualizing Mixin injections in real-time using a side-by-side view

License

Notifications You must be signed in to change notification settings

Weever1337/mixin-visualizer

Repository files navigation

Mixin Visualizer please change this logo in future

Mixin Visualizer is an IntelliJ IDEA plugin that allows you to preview the effects of SpongePowered Mixins on target classes directly within the IDE.

versiones downloades

License | CONTRIBUTING | Changelog


Supported features:

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)
  • @Inject:
    • HEAD: Injection at the start.
    • TAIL / RETURN: Injection before return statements.
    • INVOKE: Injection before/after specific method calls (supports shift).
    • Basic local variable remapping is implemented.

More to see: Mixin Documentation

TODOs (todo: use Projects in GH):

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:
  • 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

Tested on:

  • 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+

Usage:

  1. Install the plugin from the JetBrains Marketplace
  2. Open a project with Mixin usage.
  3. Open a class that is a Mixin target.
  4. Click the "Mixin Preview" button in the toolbar or use the shortcut ALT-SHIFT-RIGHT to open the Mixin Visualizer tab.
  5. Explore the transformed class in the new tab, using the Diff View to see changes.

Note: This plugin is not affiliated with SpongePowered.

About

IntelliJ IDEA plugin for visualizing Mixin injections in real-time using a side-by-side view

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Contributors 2

  •  
  •  

Languages