This document describes the breaking changes made across major versions of ModDevGradle. For a full list of changes, and in which versions they were introduced, please refer to the changelog, which can be found on the project page.
The breaking changes in this major version should not affect most projects. Nonetheless, every single breaking change is documented here, along with a suggested fix.
- Modding now needs to be enabled before dependencies are made available, and the NeoForge/NeoForm versions will
be fixed at the point in time when modding is enabled. Setting
neoForge.versionorneoForge.neoFormVersionwill enable modding when those properties are set. For more advanced use cases, theneoForge.enable { ... }block can be used, i.e. to not enable modding for themainsource set. You can only enable modding once for one version of NeoForge/NeoForm per project. - Changes to access transformer and interface injection data publishing.
accessTransformers.publishandinterfaceInjectionData.publishsyntax was changed.accessTransformers.publishedandinterfaceInjectionData.publishedwere removed.- This publishing feature was broken in ModDevGradle 1, and these changes were made to fix it.
- To fix: Refer to the README for documentation of the new syntax.
- Parchment: Specifying only the Minecraft version or only the mapping version will now fail.
- This is meant to catch usage mistakes.
- Run
beforeTasks do not run on IDE project sync anymore.- To run a task on sync, use
neoForge.ideSyncTask <task>.
- To run a task on sync, use
- Removal of
dependencyandextendsFrominside theneoForge.mods {}block.- These functions generally do not work, and were removed to reduce confusion.
sourceSet <sourceSet>should be used instead. If this is not sufficient, please open an issue.
modscannot contain the same source set multiple times.- This is meant to catch usage mistakes.
- The
modsset in runs was renamed toloadedModsto solve the name clash withmodsin theneoForgeblock. This makes it easier to define which mods should be loaded. Available mods can now be referred to usingmods.<name>instead ofneoForge.mods.<name>.- Example fix:
neoForge {
runs {
client {
/* ... */
- mods = [neoForge.mods.mod1, neoForge.mods.mod2]
+ loadedMods = [mods.mod1, mods.mod2]
}
}
}- The
neoFormRuntimeproperty on theneoForgeextension has been moved to the top-level. This should only affect advanced users. This was done in an effort to make the NFRT-specific tasks in MDG more reusable by projects not making use of a generic mod development environment. TheadditionalResultsproperty moved toneoForge.additionalMinecraftArtifactssince it is more sensible to apply this only to MDGscreateMinecraftArtifactstask rather than all NFRT tasks including user-created ones.- To fix, move your NFRT settings block to the project, and move
additionalResultstoadditionalMinecraftArtifactsin theneoForgeextension.
- To fix, move your NFRT settings block to the project, and move
- The
ideaplugin is only applied when syncing with IntelliJ.- If you want to use the
idea { }block in your build script, add theideaplugin explicitly.
- If you want to use the