Closed sebastianbhahn closed 4 weeks ago
Read the Comments in the Build.gradle Or ask chatgpt Or see how other mods do it Or ask in the discord
NeoForge 1.20.4+ officially supports Mixin, and the Mixins only need to be specified in neoforge.mods.toml
. There is a commented section in that file explaining what to do. build.gradle
does not need to be changed.
Also, you should never ask ChatGPT for advice on this. A human will always be better.
NeoForge 1.20.4+ officially supports Mixin, and the Mixins only need to be specified in
neoforge.mods.toml
. There is a commented section in that file explaining what to do.build.gradle
does not need to be changed.Also, you should never ask ChatGPT for advice on this. A human will always be better.
oh, cool. I was trying to do 1.20.2 and was banging my head against the wall for hours and finally gave up. Guess I'll skip it. Thanks.
NeoForge 1.20.4+ officially supports Mixin, and the Mixins only need to be specified in
neoforge.mods.toml
. There is a commented section in that file explaining what to do.build.gradle
does not need to be changed.Also, you should never ask ChatGPT for advice on this. A human will always be better.
ChatGPT does mixins pretty well if you give it the target class decompiled..
For reference in 1.20.2 you should be using NeoGradle's Mixin plugin,
In your build.gradle:
Add id 'net.neoforged.gradle.mixin' version <neo-gradle-version>
to your plugins block
Then define your configs via:
mixin {
config 'examplemod.mixins.json'
}
Full example available at https://github.com/neoforged/NeoGradle/blob/NG_7.0/examples/mixin/build.gradle
ChatGPT should not be used for anything Minecraft Modding related, with the rate of update/change that happens/has happened it doesn't really have a chance.
@AterAnimAvis I tried it and that works, thank you.
The implementation method which works in old forge (which I found here: https://darkhax.net/2020/07/mixins) doesn't seem to be compatible with neoforge. I get this error: Could not get unknown property 'reobf' for root project 'MDK-1.20.2' of type org.gradle.api.Project
If it's something which would be obvious to a java programmer, I'm not one, sorry. If this is something I need to read 1000 pages of java or spongepowered or gradle docs to know how to implement, see above. I also couldn't find any examples of a working way to use mixins with neoforge anywhere online after extensive searching. If it does exist somewhere, it's not searchable with "new and improved" google search.