본문으로 건너뛰기
버전: NG7

NeoGradle Configurations

NeoGradle has numerous configurations that can change how the development environment is configured.

Enabling Access Transformers

Access Transformers can widen the visibility or modify the final flag of Minecraft classes, methods, and fields.

To enable Access Transformers in the production environment, you can set accessTransformers to the configuration file in question:

minecraft {
// ...

// Add an Access Transformer file relative to the project's directory
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')

// Multiple files can be specified and are applied in order
file('src/main/resources/accesstransformer_extras.cfg')
}
}

In production, NeoForge will search for Access Transformer files as specified in mods.toml, or at META-INF/accesstransformer.cfg if none are specified:

[[accessTransformers]]
file="META-INF/accesstransformer.cfg"

[[accessTransformers]]
file="accesstransformer_extras.cfg"