Added support for legagy core mods. Yet untested

This commit is contained in:
Johann Bernhardt committed 2021-11-07 01:50:30 +01:00
1 parent 54927d7f21
commit c3ea844376
2 files changed
+15 -3

No files matched your search

+11 -3
View File
@@ -155,10 +155,14 @@ shadowJar {
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
}
if(accessTransformersFile.isEmpty() == false) {
if(accessTransformersFile) {
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
}
if(coreModClass) {
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
}
if(usesMixins.toBoolean()) {
from refMap
manifest {
@@ -184,10 +188,14 @@ jar {
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
}
if(accessTransformersFile.isEmpty() == false) {
if(accessTransformersFile) {
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
}
if(coreModClass) {
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
}
if(usesMixins.toBoolean()) {
from refMap
manifest {
@@ -317,7 +325,7 @@ task apiJar(type: Jar) {
artifacts {
archives sourcesJar
archives devJar
if(apiPackage.isEmpty() == false) {
if(apiPackage) {
archives apiJar
}
}
+4
View File
@@ -44,6 +44,10 @@ usesMixins = false
mixinPlugin =
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage =
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# This parameter is for legacy compatability only
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass =
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly = false