Topic category: Advanced modding
Following Access Transformers | NeoForged docs, I've added the appropiate line in build.gradle
file. After that, the mod does not compile, instead throws error:Could not find method minecraft() for arguments [build_cjhjesdagg1t7yfhjeqvgi6rv$_run_closure1@130f8a4f] on root project 'access' of type org.gradle.api.Project.
I've instead added it in neoforge
part, like so (following some mods repos)neoForge {
version = "21.4.101-beta"
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
} (.. rest of build.gradle)
which doesn't throw compile error anymore, but it still gets wiped. If the code blocks were added in AT file, how can I use said AT file myself? Do I have to make a plugin specifically for that?
You don't have to add that to the build.gradle anymore.
If you are using NeoForge 1.21.x you can simply add your accesstransformer.cfg file directly to the META-INF folder and NeoForge will recognize it automatically. My problem is different. When I add the said file to tthe said folder, MCreator deletes it.