diff --git a/mixinLoadingHacks.gradle b/mixinLoadingHacks.gradle index 92afe32..7242337 100644 --- a/mixinLoadingHacks.gradle +++ b/mixinLoadingHacks.gradle @@ -17,6 +17,7 @@ import java.nio.file.attribute.BasicFileAttributes // this artifact transform just adds the string Mixin FML agent is looking for into the jar name def artifactType = Attribute.of('artifactType', String) def renamedForMixinFmlAgent = Attribute.of('renamedForMixinFmlAgent', Boolean) +def hasCubicChunksBuild = gradle.includedBuilds.any { it.name == "CubicChunks" || it.name == "1.12" } dependencies { attributesSchema { @@ -37,10 +38,18 @@ dependencies { registerTransform(RenameForMixinFmlAgentTransform) { from.attribute(renamedForMixinFmlAgent, false).attribute(artifactType, "jar") to.attribute(renamedForMixinFmlAgent, true).attribute(artifactType, "jar") + parameters { + transformCubicChunksJar = !hasCubicChunksBuild + } } } -abstract class RenameForMixinFmlAgentTransform implements TransformAction { +abstract class RenameForMixinFmlAgentTransform implements TransformAction { + interface Parameters extends TransformParameters { + @Input + Property getTransformCubicChunksJar() + } + @InputArtifact abstract Provider getInputArtifact() @@ -56,6 +65,13 @@ abstract class RenameForMixinFmlAgentTransform implements TransformAction