From be3f1bfe4331b4c2a7215bb2cd4d6b3874029242 Mon Sep 17 00:00:00 2001 From: Marc Hermans Date: Sun, 3 Nov 2024 10:16:44 +0100 Subject: [PATCH] Update README.md Merging since all tests pass. --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5a5dfd2f..e3eb5f34 100644 --- a/README.md +++ b/README.md @@ -30,22 +30,28 @@ dependencies { #### 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. - - - +#### 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.