From fd105861559a16377077481fe2f0f2a157347075 Mon Sep 17 00:00:00 2001 From: FalsePattern <30945458+FalsePattern@users.noreply.github.com> Date: Fri, 10 Jun 2022 00:16:09 +0200 Subject: [PATCH] update buildscript --- build.gradle | 5 +++-- gradle.properties | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e245554..ff1cf25 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1641429628falsepattern16 +//version: 1641429628falsepattern18 /* DO NOT CHANGE THIS FILE! @@ -95,6 +95,7 @@ checkPropertyExists("repositoryName") checkPropertyExists("mavenGroupId") checkPropertyExists("mavenArtifactId") checkPropertyExists("hasMixinDeps") +checkPropertyExists("mixinPreinitConfig") String javaSourceDir = "src/main/java/" @@ -441,7 +442,7 @@ def getManifestAttributes() { if(usesMixins.toBoolean()) { manifestAttributes += [ "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", - "MixinConfigs" : "mixins." + modId + ".json", + "MixinConfigs" : "mixins." + modId + ".json" + (mixinPreinitConfig ? "," + mixinPreinitConfig : ""), "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false ] } diff --git a/gradle.properties b/gradle.properties index b2202c7..b675e7a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -68,6 +68,8 @@ hasMixinDeps = 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 a preinit mixin here. Preinit mixins should be used very rarely, if at all, so this mixin config will not be managed by the buildscript, only included. +mixinPreinitConfig = # 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