Skip to content

Commit

Permalink
Update mixins page. Fixes #752 (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored and Inscrutable committed Aug 31, 2018
1 parent eea26c2 commit d20db18
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions source/plugin/internals/mixins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ Sponge. The modifications will be bundled directly with your plugin and are only

Setup
-----

#. Add the Mixin library as dependency to your plugin:

.. code-block:: groovy
dependencies {
compile 'org.spongepowered:mixin:0.7.5-SNAPSHOT'
compile 'org.spongepowered:mixin:0.7.11-SNAPSHOT'
}
#. Add a new Mixin configuration for your plugin, e.g. ``mixins.myplugin.json`` inside your resource folder:

.. code-block:: json
{
"required": true,
"minVersion": "0.7.10",
"package": "com.example.myplugin.mixin",
"refmap": "mixins.myplugin.refmap.json",
"target": "@env(DEFAULT)",
Expand All @@ -54,18 +57,20 @@ Setup
Debugging
`````````

Normally, the Mixin configuration is registered inside JAR manifest of the plugin. Since the plugin is not packaged in a
JAR while debugging inside the IDE you need specify the Mixins to apply as command line options:

#. Add a ``--mixin <mixin config file name>`` option for each Mixin configuration file to the program arguments of your
run configuration:

::
.. code-block:: bash
--mixin mixins.myplugin.json
Production
``````````

If your Mixin is working in your development environment you still need to make some changes to make it work in
production:

Expand Down Expand Up @@ -93,7 +98,7 @@ production:
sourceSets {
main {
refMap = "mixins.myplugin.refmap.json"
ext.refMap = "mixins.myplugin.refmap.json"
}
}
Expand Down

0 comments on commit d20db18

Please sign in to comment.