Skip to content

Commit

Permalink
Update README.md Merging since all tests pass.
Browse files Browse the repository at this point in the history
  • Loading branch information
marchermans committed Nov 3, 2024
1 parent ac144c3 commit be3f1bf
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,28 @@ dependencies {

#### <a id="userdev-access-transformer" /> Access Transformers
The userdev plugin provides a way to configure access transformers for your mod.
There are two ways to configure access transformers, either by using the DSL or by using a file.

##### DSL
By using the `entry` method on the `accessTransformers` object, you can add an access transformer entry to your mod.
The system will write and generate the relevant files for you, however you will still need to add them to the file
You need to create an access transformer configuration file in your resources directory, and then configure the userdev plugin to use it.
```groovy
minecraft {
accessTransformers {
entry 'public-f net.neoforged.example.ExampleClass'
userdev {
accessTransformer {
file 'src/main/resources/META-INF/accesstransformer.cfg'
}
}
```
The path here is up to you, and does not need to be included in your final jar.




#### <a id="userdev-interface-injections" /> Interface Injections
The userdev plugin provides a way to configure interface injections for your mod.
This allows you to have a decompiled minecraft artifact that contains the interfaces you want to inject via mixins already statically applied.
The advantage of this approach is that you can use the interfaces in your code, and the mixins will be applied to the interfaces, and not the classes that implement them.
```groovy
userdev {
interfaceInjection {
file 'src/main/resources/META-INF/interfaceinjection.json'
}
}
```
You can find more information on the format of the file [here](https://github.com/neoforged/JavaSourceTransformer?tab=readme-ov-file#interface-injection).

#### Dependency management by the userdev plugin
When this plugin detects a dependency on NeoForge, it will spring into action and create the necessary NeoForm runtime tasks to build a usable Minecraft JAR-file that contains the requested NeoForge version.
Expand Down

0 comments on commit be3f1bf

Please sign in to comment.