Skip to content

Commit

Permalink
Add mixinexport tag (#150)
Browse files Browse the repository at this point in the history
* feat: add mixinexport tag, remove mixindebug tag

* fix: directory separators

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* feat: add links pointing to guides to set vm options

* move image to github

---------

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: modmuss <modmuss50@gmail.com>
  • Loading branch information
3 people committed May 1, 2024
1 parent 3ba7ca3 commit 72bd619
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
Binary file added images/mixin-export.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions tags/guide/mixindebug.ytag

This file was deleted.

25 changes: 25 additions & 0 deletions tags/guide/mixinexport.ytag
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
type: embed

colour: black
embed:
title: Exporting Mixin Classes
image:
url: "https://raw.githubusercontent.com/FabricMC/community/main/images/mixin-export.png"

---

Annotate your Mixin class with `@Debug(export = true)`, which will export the individual Mixin.

Example:
```java
@Debug(export = true)
@Mixin(...)
public class MyMixin {
// Mixin code here
}
```
You can export **all** Mixin classes by adding `-Dmixin.debug.export=true` to your VM options.
> IntelliJ IDEA - [Run/debug configurations - More options](https://www.jetbrains.com/help/idea/run-debug-configuration-java-application.html#more_options) (See "VM options")
> VSCode - [Running and debugging Java - Configuration options](https://code.visualstudio.com/docs/java/java-debugging#_configuration-options) (See "vmArgs")

Exported finalized classes will appear in `run/.mixin.out`.

0 comments on commit 72bd619

Please sign in to comment.