From c4b1866d72a579f02cc40fc86417b47fc7167b35 Mon Sep 17 00:00:00 2001 From: Johann Bernhardt Date: Sun, 7 Nov 2021 01:04:12 +0100 Subject: [PATCH] Combine FMLCorePluginContainsFMLMod and ForceLoadAsMod --- build.gradle | 12 ++++++++---- gradle.properties | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 3493d78..8f7ce6d 100644 --- a/build.gradle +++ b/build.gradle @@ -151,7 +151,9 @@ task generateAssets { shadowJar { def manifestAttributes = [:] - manifestAttributes += ["FMLCorePluginContainsFMLMod" : true] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } if(accessTransformersFile.isEmpty() == false) { manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] @@ -163,7 +165,7 @@ shadowJar { manifestAttributes += [ "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "MixinConfigs" : mixinConfigJson, - "ForceLoadAsMod" : loadNormalModAfterApplingMixins.toBoolean() + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false ] } } @@ -178,7 +180,9 @@ shadowJar { jar { def manifestAttributes = [:] - manifestAttributes += ["FMLCorePluginContainsFMLMod" : true] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } if(accessTransformersFile.isEmpty() == false) { manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] @@ -190,7 +194,7 @@ jar { manifestAttributes += [ "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "MixinConfigs" : mixinConfigJson, - "ForceLoadAsMod" : loadNormalModAfterApplingMixins.toBoolean() + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false ] } } diff --git a/gradle.properties b/gradle.properties index 0cd6999..6b9e4d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,9 +38,9 @@ usesMixins = true mixinPlugin = mixinplugin.MixinPlugin # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! mixinsPackage = mixins -# If your project contains a mod next to a mixin you want this to be true. Only if you provide a lone collections -# of mixins you set this parameter to false. Is ignored when usesMixins = false. -loadNormalModAfterApplingMixins = true +# 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 # If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your # responsibility check the licence and request permission for distribution, if required.