diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..234e6948
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,22 @@
+# This is the universal Text Editor Configuration
+# for all GTNewHorizons projects
+# See: https://editorconfig.org/
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{bat,ini}]
+end_of_line = crlf
+
+[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}]
+indent_size = 2
+
+[*.{lang,md}]
+trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
index f6cdfcf0..be880e06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,7 +26,6 @@ whitelist.json
*.iml
*.ipr
*.iws
-src/main/resources/mixins.*([!.]).json
*.bat
*.DS_Store
!gradlew.bat
@@ -35,7 +34,4 @@ addon.local.gradle
addon.local.gradle.kts
addon.late.local.gradle
addon.late.local.gradle.kts
-/.jdk/
-/.github/.jdk/
-src/main/resources/assets/boris/
-*~
+layout.json
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index b894d647..00000000
--- a/build.gradle
+++ /dev/null
@@ -1,1591 +0,0 @@
-//version: 1692122114
-/*
- DO NOT CHANGE THIS FILE!
- Also, you may replace this file at any time if there is an update available.
- Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/build.gradle for updates.
- */
-
-
-import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
-import com.gtnewhorizons.retrofuturagradle.ObfuscationAttribute
-import com.gtnewhorizons.retrofuturagradle.mcp.ReobfuscatedJar
-import com.gtnewhorizons.retrofuturagradle.minecraft.RunMinecraftTask
-import com.gtnewhorizons.retrofuturagradle.util.Distribution
-import com.matthewprenger.cursegradle.CurseArtifact
-import com.matthewprenger.cursegradle.CurseRelation
-import com.modrinth.minotaur.dependencies.ModDependency
-import com.modrinth.minotaur.dependencies.VersionDependency
-import org.gradle.internal.logging.text.StyledTextOutput.Style
-import org.gradle.internal.logging.text.StyledTextOutputFactory
-import org.gradle.internal.xml.XmlTransformer
-import org.jetbrains.gradle.ext.Application
-import org.jetbrains.gradle.ext.Gradle
-
-import javax.inject.Inject
-import java.nio.file.Files
-import java.nio.file.Paths
-import java.util.concurrent.TimeUnit
-
-buildscript {
- repositories {
- mavenCentral()
-
- maven {
- name 'forge'
- url 'https://maven.minecraftforge.net'
- }
- maven {
- // GTNH RetroFuturaGradle and ASM Fork
- name "GTNH Maven"
- url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
- allowInsecureProtocol = true
- }
- maven {
- name 'sonatype'
- url 'https://oss.sonatype.org/content/repositories/snapshots/'
- }
- maven {
- name 'Scala CI dependencies'
- url 'https://repo1.maven.org/maven2/'
- }
-
- mavenLocal()
- }
-}
-plugins {
- id 'java-library'
- id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
- id 'eclipse'
- id 'scala'
- id 'maven-publish'
- id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
- id 'org.jetbrains.kotlin.kapt' version '1.8.0' apply false
- id 'com.google.devtools.ksp' version '1.8.0-1.0.9' apply false
- id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
- id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
- id 'com.palantir.git-version' version '3.0.0' apply false
- id 'de.undercouch.download' version '5.4.0'
- id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
- id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
- id 'com.modrinth.minotaur' version '2.+' apply false
- id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
- id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
-}
-
-print("You might want to check out './gradlew :faq' if your build fails.\n")
-
-boolean settingsupdated = verifySettingsGradle()
-settingsupdated = verifyGitAttributes() || settingsupdated
-if (settingsupdated)
- throw new GradleException("Settings has been updated, please re-run task.")
-
-// In submodules, .git is a file pointing to the real git dir
-if (project.file('.git/HEAD').isFile() || project.file('.git').isFile()) {
- apply plugin: 'com.palantir.git-version'
-}
-
-def out = services.get(StyledTextOutputFactory).create('an-output')
-
-def projectJavaVersion = JavaLanguageVersion.of(8)
-
-boolean disableSpotless = project.hasProperty("disableSpotless") ? project.disableSpotless.toBoolean() : false
-
-checkPropertyExists("modName")
-checkPropertyExists("modId")
-checkPropertyExists("modGroup")
-checkPropertyExists("autoUpdateBuildScript")
-checkPropertyExists("minecraftVersion")
-checkPropertyExists("forgeVersion")
-checkPropertyExists("replaceGradleTokenInFile")
-checkPropertyExists("gradleTokenVersion")
-checkPropertyExists("apiPackage")
-checkPropertyExists("accessTransformersFile")
-checkPropertyExists("usesMixins")
-checkPropertyExists("mixinPlugin")
-checkPropertyExists("mixinsPackage")
-checkPropertyExists("coreModClass")
-checkPropertyExists("containsMixinsAndOrCoreModOnly")
-checkPropertyExists("usesShadowedDependencies")
-checkPropertyExists("developmentEnvironmentUserName")
-
-propertyDefaultIfUnset("generateGradleTokenClass", "")
-propertyDefaultIfUnset("includeWellKnownRepositories", true)
-propertyDefaultIfUnset("noPublishedSources", false)
-propertyDefaultIfUnset("usesMixinDebug", project.usesMixins)
-propertyDefaultIfUnset("forceEnableMixins", false)
-propertyDefaultIfUnset("channel", "stable")
-propertyDefaultIfUnset("mappingsVersion", "12")
-propertyDefaultIfUnset("usesMavenPublishing", true)
-propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases")
-propertyDefaultIfUnset("modrinthProjectId", "")
-propertyDefaultIfUnset("modrinthRelations", "")
-propertyDefaultIfUnset("curseForgeProjectId", "")
-propertyDefaultIfUnset("curseForgeRelations", "")
-propertyDefaultIfUnset("minimizeShadowedDependencies", true)
-propertyDefaultIfUnset("relocateShadowedDependencies", true)
-// Deprecated properties (kept for backwards compat)
-propertyDefaultIfUnset("gradleTokenModId", "")
-propertyDefaultIfUnset("gradleTokenModName", "")
-propertyDefaultIfUnset("gradleTokenGroupName", "")
-
-propertyDefaultIfUnset("enableModernJavaSyntax", false) // On by default for new projects only
-propertyDefaultIfUnset("enableGenericInjection", false) // On by default for new projects only
-
-// this is meant to be set using the user wide property file. by default we do nothing.
-propertyDefaultIfUnset("ideaOverrideBuildType", "") // Can be nothing, "gradle" or "idea"
-
-project.extensions.add(com.diffplug.blowdryer.Blowdryer, "Blowdryer", com.diffplug.blowdryer.Blowdryer) // Make blowdryer available in "apply from:" scripts
-if (!disableSpotless) {
- apply plugin: 'com.diffplug.spotless'
- apply from: Blowdryer.file('spotless.gradle')
-}
-
-String javaSourceDir = "src/main/java/"
-String scalaSourceDir = "src/main/scala/"
-String kotlinSourceDir = "src/main/kotlin/"
-
-if (usesShadowedDependencies.toBoolean()) {
- apply plugin: "com.github.johnrengelman.shadow"
-}
-
-java {
- toolchain {
- if (enableModernJavaSyntax.toBoolean()) {
- languageVersion.set(JavaLanguageVersion.of(17))
- } else {
- languageVersion.set(projectJavaVersion)
- }
- vendor.set(JvmVendorSpec.AZUL)
- }
- if (!noPublishedSources) {
- withSourcesJar()
- }
-}
-
-tasks.withType(JavaCompile).configureEach {
- options.encoding = "UTF-8"
-}
-
-tasks.withType(ScalaCompile).configureEach {
- options.encoding = "UTF-8"
-}
-
-pluginManager.withPlugin('org.jetbrains.kotlin.jvm') {
- // If Kotlin is enabled in the project
- kotlin {
- jvmToolchain(8)
- }
- // Kotlin hacks our source sets, so we hack Kotlin's tasks
- def disabledKotlinTaskList = [
- "kaptGenerateStubsMcLauncherKotlin",
- "kaptGenerateStubsPatchedMcKotlin",
- "kaptGenerateStubsInjectedTagsKotlin",
- "compileMcLauncherKotlin",
- "compilePatchedMcKotlin",
- "compileInjectedTagsKotlin",
- "kaptMcLauncherKotlin",
- "kaptPatchedMcKotlin",
- "kaptInjectedTagsKotlin",
- "kspMcLauncherKotlin",
- "kspPatchedMcKotlin",
- "kspInjectedTagsKotlin",
- ]
- tasks.configureEach { task ->
- if (task.name in disabledKotlinTaskList) {
- task.enabled = false
- }
- }
-}
-
-configurations {
- create("runtimeOnlyNonPublishable") {
- description = "Runtime only dependencies that are not published alongside the jar"
- canBeConsumed = false
- canBeResolved = false
- }
-
- create("devOnlyNonPublishable") {
- description = "Runtime and compiletime dependencies that are not published alongside the jar (compileOnly + runtimeOnlyNonPublishable)"
- canBeConsumed = false
- canBeResolved = false
- }
- compileOnly.extendsFrom(devOnlyNonPublishable)
- runtimeOnlyNonPublishable.extendsFrom(devOnlyNonPublishable)
-}
-
-if (enableModernJavaSyntax.toBoolean()) {
- repositories {
- mavenCentral {
- mavenContent {
- includeGroup("me.eigenraven.java8unsupported")
- }
- }
- }
-
- dependencies {
- annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:1.0.0'
- // workaround for https://github.com/bsideup/jabel/issues/174
- annotationProcessor 'net.java.dev.jna:jna-platform:5.13.0'
- compileOnly('com.github.bsideup.jabel:jabel-javac-plugin:1.0.0') {
- transitive = false // We only care about the 1 annotation class
- }
- // Allow using jdk.unsupported classes like sun.misc.Unsafe in the compiled code, working around JDK-8206937.
- patchedMinecraft('me.eigenraven.java8unsupported:java-8-unsupported-shim:1.0.0')
- }
-
- tasks.withType(JavaCompile).configureEach {
- if (it.name in ["compileMcLauncherJava", "compilePatchedMcJava"]) {
- return
- }
- sourceCompatibility = 17 // for the IDE support
- options.release.set(8)
-
- javaCompiler.set(javaToolchains.compilerFor {
- languageVersion.set(JavaLanguageVersion.of(17))
- vendor.set(JvmVendorSpec.AZUL)
- })
- }
-}
-
-eclipse {
- classpath {
- downloadSources = true
- downloadJavadoc = true
- }
-}
-
-final String modGroupPath = modGroup.toString().replace('.' as char, '/' as char)
-final String apiPackagePath = apiPackage.toString().replace('.' as char, '/' as char)
-
-String targetPackageJava = javaSourceDir + modGroupPath
-String targetPackageScala = scalaSourceDir + modGroupPath
-String targetPackageKotlin = kotlinSourceDir + modGroupPath
-if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
- throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
-}
-
-if (apiPackage) {
- targetPackageJava = javaSourceDir + modGroupPath + "/" + apiPackagePath
- targetPackageScala = scalaSourceDir + modGroupPath + "/" + apiPackagePath
- targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + apiPackagePath
- if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
- throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
- }
-}
-
-if (accessTransformersFile) {
- for (atFile in accessTransformersFile.split(",")) {
- String targetFile = "src/main/resources/META-INF/" + atFile.trim()
- if (!getFile(targetFile).exists()) {
- throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
- }
- tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(targetFile)
- tasks.srgifyBinpatchedJar.accessTransformerFiles.from(targetFile)
- }
-} else {
- boolean atsFound = false
- for (File at : sourceSets.getByName("main").resources.files) {
- if (at.name.toLowerCase().endsWith("_at.cfg")) {
- atsFound = true
- tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at)
- tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at)
- }
- }
- for (File at : sourceSets.getByName("api").resources.files) {
- if (at.name.toLowerCase().endsWith("_at.cfg")) {
- atsFound = true
- tasks.deobfuscateMergedJarToSrg.accessTransformerFiles.from(at)
- tasks.srgifyBinpatchedJar.accessTransformerFiles.from(at)
- }
- }
- if (atsFound) {
- logger.warn("Found and added access transformers in the resources folder, please configure gradle.properties to explicitly mention them by name")
- }
-}
-
-if (usesMixins.toBoolean()) {
- if (mixinsPackage.isEmpty()) {
- throw new GradleException("\"usesMixins\" requires \"mixinsPackage\" to be set!")
- }
- final String mixinPackagePath = mixinsPackage.toString().replaceAll("\\.", "/")
- final String mixinPluginPath = mixinPlugin.toString().replaceAll("\\.", "/")
-
- targetPackageJava = javaSourceDir + modGroupPath + "/" + mixinPackagePath
- targetPackageScala = scalaSourceDir + modGroupPath + "/" + mixinPackagePath
- targetPackageKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPackagePath
- if (!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
- throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
- }
-
- if (!mixinPlugin.isEmpty()) {
- String targetFileJava = javaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
- String targetFileScala = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".scala"
- String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + mixinPluginPath + ".java"
- String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + mixinPluginPath + ".kt"
- if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
- throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
- }
- }
-}
-
-if (coreModClass) {
- final String coreModPath = coreModClass.toString().replaceAll("\\.", "/")
- String targetFileJava = javaSourceDir + modGroupPath + "/" + coreModPath + ".java"
- String targetFileScala = scalaSourceDir + modGroupPath + "/" + coreModPath + ".scala"
- String targetFileScalaJava = scalaSourceDir + modGroupPath + "/" + coreModPath + ".java"
- String targetFileKotlin = kotlinSourceDir + modGroupPath + "/" + coreModPath + ".kt"
- if (!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
- throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
- }
-}
-
-configurations.configureEach {
- resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
-
- // Make sure GregTech build won't time out
- System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String)
- System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String)
-}
-
-// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
-try {
- 'git config core.fileMode false'.execute()
-}
-catch (Exception ignored) {
- out.style(Style.Failure).println("git isn't installed at all")
-}
-
-// Pulls version first from the VERSION env and then git tag
-String identifiedVersion
-String versionOverride = System.getenv("VERSION") ?: null
-try {
- // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
- if (versionOverride == null) {
- def gitDetails = versionDetails()
- def isDirty = gitVersion().endsWith(".dirty") // No public API for this, isCleanTag has a different meaning
- String branchName = gitDetails.branchName ?: (System.getenv('GIT_BRANCH') ?: 'git')
- if (branchName.startsWith('origin/')) {
- branchName = branchName.minus('origin/')
- }
- branchName = branchName.replaceAll("[^a-zA-Z0-9-]+", "-") // sanitize branch names for semver
- identifiedVersion = gitDetails.lastTag ?: '${gitDetails.gitHash}'
- if (gitDetails.commitDistance > 0) {
- identifiedVersion += "-${branchName}.${gitDetails.commitDistance}+${gitDetails.gitHash}"
- if (isDirty) {
- identifiedVersion += "-dirty"
- }
- } else if (isDirty) {
- identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty"
- }
- } else {
- identifiedVersion = versionOverride
- }
-}
-catch (Exception ignored) {
- out.style(Style.Failure).text(
- 'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
- 'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' +
- 'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
- )
- versionOverride = 'NO-GIT-TAG-SET'
- identifiedVersion = versionOverride
-}
-version = identifiedVersion
-ext {
- modVersion = identifiedVersion
-}
-
-if (identifiedVersion == versionOverride) {
- out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
-}
-
-group = "com.github.GTNewHorizons"
-if (project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
- base {
- archivesName = customArchiveBaseName
- }
-} else {
- base {
- archivesName = modId
- }
-}
-
-
-minecraft {
- if (replaceGradleTokenInFile) {
- for (f in replaceGradleTokenInFile.split(',')) {
- tagReplacementFiles.add f
- }
- }
- if (gradleTokenModId) {
- injectedTags.put gradleTokenModId, modId
- }
- if (gradleTokenModName) {
- injectedTags.put gradleTokenModName, modName
- }
- if (gradleTokenVersion) {
- injectedTags.put gradleTokenVersion, modVersion
- }
- if (gradleTokenGroupName) {
- injectedTags.put gradleTokenGroupName, modGroup
- }
- if (enableGenericInjection.toBoolean()) {
- injectMissingGenerics.set(true)
- }
-
- username = developmentEnvironmentUserName.toString()
-
- lwjgl3Version = "3.3.2"
-
- // Enable assertions in the current mod
- extraRunJvmArguments.add("-ea:${modGroup}")
-
- if (usesMixins.toBoolean() || forceEnableMixins.toBoolean()) {
- if (usesMixinDebug.toBoolean()) {
- extraRunJvmArguments.addAll([
- "-Dmixin.debug.countInjections=true",
- "-Dmixin.debug.verbose=true",
- "-Dmixin.debug.export=true"
- ])
- }
- }
-
- // Blowdryer is present in some old mod builds, do not propagate it further as a dependency
- // IC2 has no reobf jars in its Maven
- groupsToExcludeFromAutoReobfMapping.addAll(["com.diffplug", "com.diffplug.durian", "net.industrial-craft"])
-}
-
-if (generateGradleTokenClass) {
- tasks.injectTags.outputClassName.set(generateGradleTokenClass)
-}
-
-// Custom reobf auto-mappings
-configurations.configureEach {
- dependencies.configureEach { dep ->
- if (dep instanceof org.gradle.api.artifacts.ExternalModuleDependency) {
- if (dep.group == "net.industrial-craft" && dep.name == "industrialcraft-2") {
- // https://www.curseforge.com/minecraft/mc-mods/industrial-craft/files/2353971
- project.dependencies.reobfJarConfiguration("curse.maven:ic2-242638:2353971")
- }
- }
- }
- def obfuscationAttr = it.attributes.getAttribute(ObfuscationAttribute.OBFUSCATION_ATTRIBUTE)
- if (obfuscationAttr != null && obfuscationAttr.name == ObfuscationAttribute.SRG) {
- resolutionStrategy.eachDependency { DependencyResolveDetails details ->
- // Remap CoFH core cursemaven dev jar to the obfuscated version for runObfClient/Server
- if (details.requested.group == 'curse.maven' && details.requested.name.endsWith('-69162') && details.requested.version == '2388751') {
- details.useVersion '2388750'
- details.because 'Pick obfuscated jar'
- }
- }
- }
-}
-
-// Ensure tests have access to minecraft classes
-sourceSets {
- test {
- java {
- compileClasspath += sourceSets.patchedMc.output + sourceSets.mcLauncher.output
- runtimeClasspath += sourceSets.patchedMc.output + sourceSets.mcLauncher.output
- }
- }
-}
-
-if (file('addon.gradle.kts').exists()) {
- apply from: 'addon.gradle.kts'
-} else if (file('addon.gradle').exists()) {
- apply from: 'addon.gradle'
-}
-
-// File for local tweaks not commited to Git
-if (file('addon.local.gradle.kts').exists()) {
- apply from: 'addon.local.gradle.kts'
-} else if (file('addon.local.gradle').exists()) {
- apply from: 'addon.local.gradle'
-}
-
-// Allow unsafe repos but warn
-repositories.configureEach { repo ->
- if (repo instanceof org.gradle.api.artifacts.repositories.UrlArtifactRepository) {
- if (repo.getUrl() != null && repo.getUrl().getScheme() == "http" && !repo.allowInsecureProtocol) {
- logger.warn("Deprecated: Allowing insecure connections for repo '${repo.name}' - add 'allowInsecureProtocol = true'")
- repo.allowInsecureProtocol = true
- }
- }
-}
-
-if (file('repositories.gradle.kts').exists()) {
- apply from: 'repositories.gradle.kts'
-} else if (file('repositories.gradle').exists()) {
- apply from: 'repositories.gradle'
-} else {
- logger.error("Neither repositories.gradle.kts nor repositories.gradle was found, make sure you extracted the full ExampleMod template.")
- throw new RuntimeException("Missing repositories.gradle[.kts]")
-}
-
-configurations {
- runtimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
- testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
- for (config in [compileClasspath, runtimeClasspath, testCompileClasspath, testRuntimeClasspath]) {
- if (usesShadowedDependencies.toBoolean()) {
- config.extendsFrom(shadowImplementation)
- // TODO: remove Compile after all uses are refactored to Implementation
- config.extendsFrom(shadeCompile)
- config.extendsFrom(shadowCompile)
- }
- }
- // A "bag-of-dependencies"-style configuration for backwards compatibility, gets put in "api"
- create("compile") {
- description = "Deprecated: use api or implementation instead, gets put in api"
- canBeConsumed = false
- canBeResolved = false
- visible = false
- }
- create("testCompile") {
- description = "Deprecated: use testImplementation instead"
- canBeConsumed = false
- canBeResolved = false
- visible = false
- }
- api.extendsFrom(compile)
- testImplementation.extendsFrom(testCompile)
-}
-
-afterEvaluate {
- if (!configurations.compile.allDependencies.empty || !configurations.testCompile.allDependencies.empty) {
- logger.warn("This project uses deprecated `compile` dependencies, please migrate to using `api` and `implementation`")
- logger.warn("For more details, see https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/master/dependencies.gradle")
- }
-}
-
-repositories {
- maven {
- name 'Overmind forge repo mirror'
- url 'https://gregtech.overminddl1.com/'
- }
- maven {
- name = "GTNH Maven"
- url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
- allowInsecureProtocol = true
- }
- maven {
- name 'sonatype'
- url 'https://oss.sonatype.org/content/repositories/snapshots/'
- content {
- includeGroup "org.lwjgl"
- }
- }
- if (includeWellKnownRepositories.toBoolean()) {
- exclusiveContent {
- forRepository {
- maven {
- name "CurseMaven"
- url "https://cursemaven.com"
- }
- }
- filter {
- includeGroup "curse.maven"
- }
- }
- exclusiveContent {
- forRepository {
- maven {
- name = "Modrinth"
- url = "https://api.modrinth.com/maven"
- }
- }
- filter {
- includeGroup "maven.modrinth"
- }
- }
- maven {
- name = "ic2"
- url = "https://maven.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- name = "ic2-mirror"
- url = "https://maven2.ic2.player.to/"
- metadataSources {
- mavenPom()
- artifact()
- }
- }
- maven {
- name "MMD Maven"
- url "https://maven.mcmoddev.com/"
- }
- }
-}
-
-def mixinProviderGroup = "io.github.legacymoddingmc"
-def mixinProviderModule = "unimixins"
-def mixinProviderVersion = "0.1.7.1"
-def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
-def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
-ext.mixinProviderSpec = mixinProviderSpec
-
-def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
-
-dependencies {
- if (usesMixins.toBoolean()) {
- annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
- annotationProcessor('com.google.guava:guava:24.1.1-jre')
- annotationProcessor('com.google.code.gson:gson:2.8.6')
- annotationProcessor(mixinProviderSpec)
- if (usesMixinDebug.toBoolean()) {
- runtimeOnlyNonPublishable('org.jetbrains:intellij-fernflower:1.2.1.16')
- }
- }
- if (usesMixins.toBoolean()) {
- implementation(modUtils.enableMixins(mixinProviderSpec, mixingConfigRefMap))
- } else if (forceEnableMixins.toBoolean()) {
- runtimeOnlyNonPublishable(mixinProviderSpec)
- }
-}
-
-pluginManager.withPlugin('org.jetbrains.kotlin.kapt') {
- if (usesMixins.toBoolean()) {
- dependencies {
- kapt(mixinProviderSpec)
- }
- }
-}
-
-// Replace old mixin mods with unimixins
-// https://docs.gradle.org/8.0.2/userguide/resolution_rules.html#sec:substitution_with_classifier
-configurations.all {
- resolutionStrategy.dependencySubstitution {
- substitute module('com.gtnewhorizon:gtnhmixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
- substitute module('com.github.GTNewHorizons:Mixingasm') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
- substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
- substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
- substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
- }
-}
-
-dependencies {
- constraints {
- def minGtnhLibVersion = "0.0.13"
- implementation("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
- because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
- }
- runtimeOnly("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
- because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
- }
- devOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
- because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
- }
- runtimeOnlyNonPublishable("com.github.GTNewHorizons:GTNHLib:${minGtnhLibVersion}") {
- because("fixes duplicate mod errors in java 17 configurations using old gtnhlib")
- }
- }
-}
-
-if (file('dependencies.gradle.kts').exists()) {
- apply from: 'dependencies.gradle.kts'
-} else if (file('dependencies.gradle').exists()) {
- apply from: 'dependencies.gradle'
-} else {
- logger.error("Neither dependencies.gradle.kts nor dependencies.gradle was found, make sure you extracted the full ExampleMod template.")
- throw new RuntimeException("Missing dependencies.gradle[.kts]")
-}
-
-tasks.register('generateAssets') {
- group = "GTNH Buildscript"
- description = "Generates a mixin config file at /src/main/resources/mixins.modid.json if needed"
- onlyIf { usesMixins.toBoolean() }
- doLast {
- def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json")
- if (!mixinConfigFile.exists()) {
- def mixinPluginLine = ""
- if (!mixinPlugin.isEmpty()) {
- // We might not have a mixin plugin if we're using early/late mixins
- mixinPluginLine += """\n "plugin": "${modGroup}.${mixinPlugin}", """
- }
-
- mixinConfigFile.text = """{
- "required": true,
- "minVersion": "0.8.5-GTNH",
- "package": "${modGroup}.${mixinsPackage}",${mixinPluginLine}
- "refmap": "${mixingConfigRefMap}",
- "target": "@env(DEFAULT)",
- "compatibilityLevel": "JAVA_8",
- "mixins": [],
- "client": [],
- "server": []
-}
-"""
- }
- }
-}
-
-if (usesMixins.toBoolean()) {
- tasks.named("processResources").configure {
- dependsOn("generateAssets")
- }
-
- tasks.named("compileJava", JavaCompile).configure {
- options.compilerArgs += [
- // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
- "-XDenableSunApiLintControl",
- "-XDignore.symbol.file"
- ]
- }
-}
-
-tasks.named("processResources", ProcessResources).configure {
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.mcVersion
- exclude("spotless.gradle")
-
- // replace stuff in mcmod.info, nothing else. replaces ${key} with value in text
- filesMatching("mcmod.info") {
- expand "minecraftVersion": project.minecraft.mcVersion,
- "modVersion": modVersion,
- "modId": modId,
- "modName": modName
- }
-
- if (usesMixins.toBoolean()) {
- dependsOn("compileJava", "compileScala")
- }
-}
-
-ext.java17Toolchain = (JavaToolchainSpec spec) -> {
- spec.languageVersion.set(JavaLanguageVersion.of(17))
- spec.vendor.set(JvmVendorSpec.matching("jetbrains"))
-}
-
-ext.java17DependenciesCfg = configurations.create("java17Dependencies") {
- extendsFrom(configurations.getByName("runtimeClasspath")) // Ensure consistent transitive dependency resolution
- canBeConsumed = false
-}
-ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies") {
- canBeConsumed = false
-}
-
-dependencies {
- def lwjgl3ifyVersion = '1.4.0'
- def asmVersion = '9.4'
- if (modId != 'lwjgl3ify') {
- java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
- }
- if (modId != 'hodgepodge') {
- java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.2.26')
- }
-
- java17PatchDependencies('net.minecraft:launchwrapper:1.17.2') {transitive = false}
- java17PatchDependencies("org.ow2.asm:asm:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-commons:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-tree:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-analysis:${asmVersion}")
- java17PatchDependencies("org.ow2.asm:asm-util:${asmVersion}")
- java17PatchDependencies('org.ow2.asm:asm-deprecated:7.1')
- java17PatchDependencies("org.apache.commons:commons-lang3:3.12.0")
- java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
-}
-
-ext.java17JvmArgs = [
- // Java 9+ support
- "--illegal-access=warn",
- "-Djava.security.manager=allow",
- "-Dfile.encoding=UTF-8",
- "--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED",
- "--add-opens", "java.base/java.net=ALL-UNNAMED",
- "--add-opens", "java.base/java.nio=ALL-UNNAMED",
- "--add-opens", "java.base/java.io=ALL-UNNAMED",
- "--add-opens", "java.base/java.lang=ALL-UNNAMED",
- "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED",
- "--add-opens", "java.base/java.text=ALL-UNNAMED",
- "--add-opens", "java.base/java.util=ALL-UNNAMED",
- "--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
- "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
- "--add-opens", "jdk.naming.dns/com.sun.jndi.dns=ALL-UNNAMED,java.naming",
- "--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED",
- "--add-modules", "jdk.dynalink",
- "--add-opens", "jdk.dynalink/jdk.dynalink.beans=ALL-UNNAMED",
- "--add-modules", "java.sql.rowset",
- "--add-opens", "java.sql.rowset/javax.sql.rowset.serial=ALL-UNNAMED"
-]
-
-ext.hotswapJvmArgs = [
- // DCEVM advanced hot reload
- "-XX:+AllowEnhancedClassRedefinition",
- "-XX:HotswapAgent=fatjar"
-]
-
-ext.setupHotswapAgentTask = tasks.register("setupHotswapAgent") {
- group = "GTNH Buildscript"
- description = "Installs a recent version of HotSwapAgent into the Java 17 JetBrains runtime directory"
- def hsaUrl = 'https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jar'
- def targetFolderProvider = javaToolchains.launcherFor(java17Toolchain).map {it.metadata.installationPath.dir("lib/hotswap")}
- def targetFilename = "hotswap-agent.jar"
- onlyIf {
- !targetFolderProvider.get().file(targetFilename).asFile.exists()
- }
- doLast {
- def targetFolder = targetFolderProvider.get()
- targetFolder.asFile.mkdirs()
- download.run {
- src hsaUrl
- dest targetFolder.file(targetFilename).asFile
- overwrite false
- tempAndMove true
- }
- }
-}
-
-public abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
- // IntelliJ doesn't seem to allow commandline arguments so we also support an env variable
- private boolean enableHotswap = Boolean.valueOf(System.getenv("HOTSWAP"));
-
- @Input
- public boolean getEnableHotswap() { return enableHotswap }
- @Option(option = "hotswap", description = "Enables HotSwapAgent for enhanced class reloading under a debugger")
- public boolean setEnableHotswap(boolean enable) { enableHotswap = enable }
-
- @Inject
- public RunHotswappableMinecraftTask(Distribution side, String superTask, org.gradle.api.invocation.Gradle gradle) {
- super(side, gradle)
-
- this.lwjglVersion = 3
- this.javaLauncher = project.javaToolchains.launcherFor(project.java17Toolchain)
- this.extraJvmArgs.addAll(project.java17JvmArgs)
- this.extraJvmArgs.addAll(project.provider(() -> enableHotswap ? project.hotswapJvmArgs : []))
-
- this.classpath(project.java17PatchDependenciesCfg)
- if (side == Distribution.CLIENT) {
- this.classpath(project.minecraftTasks.lwjgl3Configuration)
- }
- // Use a raw provider instead of map to not create a dependency on the task
- this.classpath(project.provider(() -> project.tasks.named(superTask, RunMinecraftTask).get().classpath))
- this.classpath.filter { file ->
- !file.path.contains("2.9.4-nightly-20150209") // Remove lwjgl2
- }
- this.classpath(project.java17DependenciesCfg)
- }
-
- public void setup(Project project) {
- super.setup(project)
- if (project.usesMixins.toBoolean()) {
- this.extraJvmArgs.addAll(project.provider(() -> {
- def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
- mixinCfg.canBeConsumed = false
- mixinCfg.transitive = false
- enableHotswap ? ["-javaagent:" + mixinCfg.singleFile.absolutePath] : []
- }))
- }
- }
-}
-
-def runClient17Task = tasks.register("runClient17", RunHotswappableMinecraftTask, Distribution.CLIENT, "runClient")
-runClient17Task.configure {
- setup(project)
- group = "Modded Minecraft"
- description = "Runs the modded client using Java 17, lwjgl3ify and Hodgepodge"
- dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar')
- mainClass = "GradleStart"
- username = minecraft.username
- userUUID = minecraft.userUUID
-}
-
-def runServer17Task = tasks.register("runServer17", RunHotswappableMinecraftTask, Distribution.DEDICATED_SERVER, "runServer")
-runServer17Task.configure {
- setup(project)
- group = "Modded Minecraft"
- description = "Runs the modded server using Java 17, lwjgl3ify and Hodgepodge"
- dependsOn(setupHotswapAgentTask, mcpTasks.launcherSources.classesTaskName, minecraftTasks.taskDownloadVanillaAssets, mcpTasks.taskPackagePatchedMc, 'jar')
- mainClass = "GradleStartServer"
- extraArgs.add("nogui")
-}
-
-def getManifestAttributes() {
- def manifestAttributes = [:]
- if (!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
- manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
- }
-
- if (accessTransformersFile) {
- manifestAttributes += ["FMLAT": accessTransformersFile.toString()]
- }
-
- if (coreModClass) {
- manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
- }
-
- if (usesMixins.toBoolean()) {
- manifestAttributes += [
- "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
- "MixinConfigs" : "mixins." + modId + ".json",
- "ForceLoadAsMod": !containsMixinsAndOrCoreModOnly.toBoolean()
- ]
- }
- return manifestAttributes
-}
-
-tasks.named("jar", Jar).configure {
- manifest {
- attributes(getManifestAttributes())
- }
-}
-
-if (usesShadowedDependencies.toBoolean()) {
- tasks.named("shadowJar", ShadowJar).configure {
- manifest {
- attributes(getManifestAttributes())
- }
-
- if (minimizeShadowedDependencies.toBoolean()) {
- minimize() // This will only allow shading for actually used classes
- }
- configurations = [
- project.configurations.shadowImplementation,
- project.configurations.shadowCompile,
- project.configurations.shadeCompile
- ]
- archiveClassifier.set('dev')
- if (relocateShadowedDependencies.toBoolean()) {
- relocationPrefix = modGroup + ".shadow"
- enableRelocation = true
- }
- }
- configurations.runtimeElements.outgoing.artifacts.clear()
- configurations.apiElements.outgoing.artifacts.clear()
- configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
- configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
- tasks.named("jar", Jar) {
- enabled = false
- finalizedBy(tasks.shadowJar)
- }
- tasks.named("reobfJar", ReobfuscatedJar) {
- inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
- }
- AdhocComponentWithVariants javaComponent = (AdhocComponentWithVariants) project.components.findByName("java")
- javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
- skip()
- }
- for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
- tasks.named(runTask).configure {
- dependsOn("shadowJar")
- }
- }
-}
-ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar
-ext.publishableObfJar = tasks.reobfJar
-
-tasks.register('apiJar', Jar) {
- from(sourceSets.main.allSource) {
- include modGroupPath + "/" + apiPackagePath + '/**'
- }
-
- from(sourceSets.main.output) {
- include modGroupPath + "/" + apiPackagePath + '/**'
- }
-
- from(sourceSets.main.resources.srcDirs) {
- include("LICENSE")
- }
-
- getArchiveClassifier().set('api')
-}
-
-artifacts {
- if (!noPublishedSources) {
- archives tasks.named("sourcesJar")
- }
- if (apiPackage) {
- archives tasks.named("apiJar")
- }
-}
-
-idea {
- module {
- downloadJavadoc = true
- downloadSources = true
- inheritOutputDirs = true
- }
- project {
- settings {
- if (ideaOverrideBuildType != "") {
- delegateActions {
- if ("gradle".equalsIgnoreCase(ideaOverrideBuildType)) {
- delegateBuildRunToGradle = true
- testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.GRADLE
- } else if ("idea".equalsIgnoreCase(ideaOverrideBuildType)) {
- delegateBuildRunToGradle = false
- testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM
- } else {
- throw GradleScriptException('Accepted value for ideaOverrideBuildType is one of gradle or idea.')
- }
- }
- }
- runConfigurations {
- "0. Build and Test"(Gradle) {
- taskNames = ["build"]
- }
- "1. Run Client"(Gradle) {
- taskNames = ["runClient"]
- }
- "2. Run Server"(Gradle) {
- taskNames = ["runServer"]
- }
- "1a. Run Client (Java 17)"(Gradle) {
- taskNames = ["runClient17"]
- }
- "2a. Run Server (Java 17)"(Gradle) {
- taskNames = ["runServer17"]
- }
- "1b. Run Client (Java 17, Hotswap)"(Gradle) {
- taskNames = ["runClient17"]
- envs = ["HOTSWAP": "true"]
- }
- "2b. Run Server (Java 17, Hotswap)"(Gradle) {
- taskNames = ["runServer17"]
- envs = ["HOTSWAP": "true"]
- }
- "3. Run Obfuscated Client"(Gradle) {
- taskNames = ["runObfClient"]
- }
- "4. Run Obfuscated Server"(Gradle) {
- taskNames = ["runObfServer"]
- }
- if (!disableSpotless) {
- "5. Apply spotless"(Gradle) {
- taskNames = ["spotlessApply"]
- }
- }
- def coreModArgs = ""
- if (coreModClass) {
- coreModArgs = ' "-Dfml.coreMods.load=' + modGroup + '.' + coreModClass + '"'
- }
- "Run Client (IJ Native)"(Application) {
- mainClass = "GradleStart"
- moduleName = project.name + ".ideVirtualMain"
- afterEvaluate {
- workingDirectory = tasks.runClient.workingDir.absolutePath
- programParameters = tasks.runClient.calculateArgs(project).collect { '"' + it + '"' }.join(' ')
- jvmArgs = tasks.runClient.calculateJvmArgs(project).collect { '"' + it + '"' }.join(' ') +
- ' ' + tasks.runClient.systemProperties.collect { '"-D' + it.key + '=' + it.value.toString() + '"' }.join(' ') +
- coreModArgs
- }
- }
- "Run Server (IJ Native)"(Application) {
- mainClass = "GradleStartServer"
- moduleName = project.name + ".ideVirtualMain"
- afterEvaluate {
- workingDirectory = tasks.runServer.workingDir.absolutePath
- programParameters = tasks.runServer.calculateArgs(project).collect { '"' + it + '"' }.join(' ')
- jvmArgs = tasks.runServer.calculateJvmArgs(project).collect { '"' + it + '"' }.join(' ') +
- ' ' + tasks.runServer.systemProperties.collect { '"-D' + it.key + '=' + it.value.toString() + '"' }.join(' ') +
- coreModArgs
- }
- }
- }
- compiler.javac {
- afterEvaluate {
- javacAdditionalOptions = "-encoding utf8"
- moduleJavacAdditionalOptions = [
- (project.name + ".main"): tasks.compileJava.options.compilerArgs.collect { '"' + it + '"' }.join(' ')
- ]
- }
- }
- withIDEADir { File ideaDir ->
- if (!ideaDir.path.contains(".idea")) {
- // If an .ipr file exists, the project root directory is passed here instead of the .idea subdirectory
- ideaDir = new File(ideaDir, ".idea")
- }
- if (ideaDir.isDirectory()) {
- def miscFile = new File(ideaDir, "misc.xml")
- if (miscFile.isFile()) {
- boolean dirty = false
- def miscTransformer = new XmlTransformer()
- miscTransformer.addAction { root ->
- Node rootNode = root.asNode()
- def rootManager = rootNode
- .component.find { it.@name == 'ProjectRootManager' }
- if (!rootManager) {
- rootManager = rootNode.appendNode('component', ['name': 'ProjectRootManager', 'version': '2'])
- dirty = true
- }
- def output = rootManager.output
- if (!output) {
- output = rootManager.appendNode('output')
- dirty = true
- }
- if (!output.@url) {
- // Only modify the output url if it doesn't yet have one, or if the existing one is blank somehow.
- // This is a sensible default for most setups
- output.@url = 'file://$PROJECT_DIR$/build/ideaBuild'
- dirty = true
- }
- }
- def result = miscTransformer.transform(miscFile.text)
- if (dirty) {
- miscFile.write(result)
- }
- } else {
- miscFile.text = """
-
-
-
-
-
-"""
- }
- }
- }
- }
- }
-}
-
-tasks.named("processIdeaSettings").configure {
- dependsOn("injectTags")
-}
-
-tasks.named("ideVirtualMainClasses").configure {
- // Make IntelliJ "Build project" build the mod jars
- dependsOn("jar", "reobfJar")
- if (!disableSpotless) {
- dependsOn("spotlessCheck")
- }
-}
-
-// workaround variable hiding in pom processing
-def projectConfigs = project.configurations
-
-publishing {
- publications {
- create("maven", MavenPublication) {
- from components.java
-
- if (apiPackage) {
- artifact apiJar
- }
-
- groupId = System.getenv("ARTIFACT_GROUP_ID") ?: project.group
- artifactId = System.getenv("ARTIFACT_ID") ?: project.name
- // Using the identified version, not project.version as it has the prepended 1.7.10
- version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
- }
- }
-
- repositories {
- if (usesMavenPublishing.toBoolean()) {
- maven {
- url = mavenPublishUrl
- allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
- credentials {
- username = System.getenv("MAVEN_USER") ?: "NONE"
- password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
- }
- }
- }
- }
-}
-
-if (modrinthProjectId.size() != 0 && System.getenv("MODRINTH_TOKEN") != null) {
- apply plugin: 'com.modrinth.minotaur'
-
- File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md")
-
- modrinth {
- token = System.getenv("MODRINTH_TOKEN")
- projectId = modrinthProjectId
- versionNumber = identifiedVersion
- versionType = identifiedVersion.endsWith("-pre") ? "beta" : "release"
- changelog = changelogFile.exists() ? changelogFile.getText("UTF-8") : ""
- uploadFile = publishableObfJar
- additionalFiles = getSecondaryArtifacts()
- gameVersions = [minecraftVersion]
- loaders = ["forge"]
- debugMode = false
- }
-
- if (modrinthRelations.size() != 0) {
- String[] deps = modrinthRelations.split(";")
- deps.each { dep ->
- if (dep.size() == 0) {
- return
- }
- String[] parts = dep.split(":")
- String[] qual = parts[0].split("-")
- addModrinthDep(qual[0], qual[1], parts[1])
- }
- }
- if (usesMixins.toBoolean()) {
- addModrinthDep("required", "project", "unimixins")
- }
- tasks.modrinth.dependsOn(build)
- tasks.publish.dependsOn(tasks.modrinth)
-}
-
-if (curseForgeProjectId.size() != 0 && System.getenv("CURSEFORGE_TOKEN") != null) {
- apply plugin: 'com.matthewprenger.cursegradle'
-
- File changelogFile = new File(System.getenv("CHANGELOG_FILE") ?: "CHANGELOG.md")
-
- curseforge {
- apiKey = System.getenv("CURSEFORGE_TOKEN")
- project {
- id = curseForgeProjectId
- if (changelogFile.exists()) {
- changelogType = "markdown"
- changelog = changelogFile
- }
- releaseType = identifiedVersion.endsWith("-pre") ? "beta" : "release"
- addGameVersion minecraftVersion
- addGameVersion "Forge"
- mainArtifact publishableObfJar
- for (artifact in getSecondaryArtifacts()) addArtifact artifact
- }
-
- options {
- javaIntegration = false
- forgeGradleIntegration = false
- debug = false
- }
- }
-
- if (curseForgeRelations.size() != 0) {
- String[] deps = curseForgeRelations.split(";")
- deps.each { dep ->
- if (dep.size() == 0) {
- return
- }
- String[] parts = dep.split(":")
- addCurseForgeRelation(parts[0], parts[1])
- }
- }
- if (usesMixins.toBoolean()) {
- addCurseForgeRelation("requiredDependency", "unimixins")
- }
- tasks.curseforge.dependsOn(build)
- tasks.publish.dependsOn(tasks.curseforge)
-}
-
-def addModrinthDep(String scope, String type, String name) {
- com.modrinth.minotaur.dependencies.Dependency dep;
- if (!(scope in ["required", "optional", "incompatible", "embedded"])) {
- throw new Exception("Invalid modrinth dependency scope: " + scope)
- }
- switch (type) {
- case "project":
- dep = new ModDependency(name, scope)
- break
- case "version":
- dep = new VersionDependency(name, scope)
- break
- default:
- throw new Exception("Invalid modrinth dependency type: " + type)
- }
- project.modrinth.dependencies.add(dep)
-}
-
-def addCurseForgeRelation(String type, String name) {
- if (!(type in ["requiredDependency", "embeddedLibrary", "optionalDependency", "tool", "incompatible"])) {
- throw new Exception("Invalid CurseForge relation type: " + type)
- }
- CurseArtifact artifact = project.curseforge.curseProjects[0].mainArtifact
- CurseRelation rel = (artifact.curseRelations ?: (artifact.curseRelations = new CurseRelation()))
- rel."$type"(name)
-}
-
-// Updating
-
-def buildscriptGradleVersion = "8.2.1"
-
-tasks.named('wrapper', Wrapper).configure {
- gradleVersion = buildscriptGradleVersion
-}
-
-tasks.register('updateBuildScript') {
- group = 'GTNH Buildscript'
- description = 'Updates the build script to the latest version'
-
- if (gradle.gradleVersion != buildscriptGradleVersion && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_GRADLE_UPDATE')) {
- dependsOn('wrapper')
- }
-
- doLast {
- if (performBuildScriptUpdate()) return
-
- print("Build script already up-to-date!")
- }
-}
-
-if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISABLE_BUILDSCRIPT_UPDATE_CHECK') && isNewBuildScriptVersionAvailable()) {
- if (autoUpdateBuildScript.toBoolean()) {
- performBuildScriptUpdate()
- } else {
- out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'")
- if (gradle.gradleVersion != buildscriptGradleVersion) {
- out.style(Style.SuccessHeader).println("updateBuildScript can update gradle from ${gradle.gradleVersion} to ${buildscriptGradleVersion}\n")
- }
- }
-}
-
-// If you want to add more cases to this task, implement them as arguments if total amount to print gets too large
-tasks.register('faq') {
- group = 'GTNH Buildscript'
- description = 'Prints frequently asked questions about building a project'
-
- doLast {
- print("If your build fails to fetch dependencies, run './gradlew updateDependencies'. " +
- "Or you can manually check if the versions are still on the distributing sites - " +
- "the links can be found in repositories.gradle and build.gradle:repositories, " +
- "but not build.gradle:buildscript.repositories - those ones are for gradle plugin metadata.\n\n" +
- "If your build fails to recognize the syntax of new Java versions, enable Jabel in your " +
- "gradle.properties. See how it's done in GTNH ExampleMod/gradle.properties. " +
- "However, keep in mind that Jabel enables only syntax features, but not APIs that were introduced in " +
- "Java 9 or later.")
- }
-}
-
-static URL availableBuildScriptUrl() {
- new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/build.gradle")
-}
-
-static URL exampleSettingsGradleUrl() {
- new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/settings.gradle.example")
-}
-
-static URL exampleGitAttributesUrl() {
- new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/master/.gitattributes")
-}
-
-
-boolean verifyGitAttributes() {
- def gitattributesFile = getFile(".gitattributes")
- if (!gitattributesFile.exists()) {
- println("Downloading default .gitattributes")
- exampleGitAttributesUrl().withInputStream { i -> gitattributesFile.withOutputStream { it << i } }
- exec {
- workingDir '.'
- commandLine 'git', 'add', '--renormalize', '.'
- }
- return true
- }
- return false
-}
-
-boolean verifySettingsGradle() {
- def settingsFile = getFile("settings.gradle")
- if (!settingsFile.exists()) {
- println("Downloading default settings.gradle")
- exampleSettingsGradleUrl().withInputStream { i -> settingsFile.withOutputStream { it << i } }
- return true
- }
- return false
-}
-
-boolean performBuildScriptUpdate() {
- if (isNewBuildScriptVersionAvailable()) {
- def buildscriptFile = getFile("build.gradle")
- availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
- def out = services.get(StyledTextOutputFactory).create('buildscript-update-output')
- out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
- boolean settingsupdated = verifySettingsGradle()
- settingsupdated = verifyGitAttributes() || settingsupdated
- if (settingsupdated)
- throw new GradleException("Settings has been updated, please re-run task.")
- return true
- }
- return false
-}
-
-boolean isNewBuildScriptVersionAvailable() {
- Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
-
- String currentBuildScript = getFile("build.gradle").getText()
- String currentBuildScriptHash = getVersionHash(currentBuildScript)
- String availableBuildScriptHash
- try {
- String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
- availableBuildScriptHash = getVersionHash(availableBuildScript)
- } catch (IOException e) {
- logger.warn("Could not check for buildscript update availability: {}", e.message)
- return false
- }
-
- boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
- return !isUpToDate
-}
-
-static String getVersionHash(String buildScriptContent) {
- String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
- if (versionLine != null) {
- return versionLine.split(": ").last()
- }
- return ""
-}
-
-// Parameter Deobfuscation
-
-tasks.register('deobfParams') {
- group = 'GTNH Buildscript'
- description = 'Rename all obfuscated parameter names inherited from Minecraft classes'
- doLast { // TODO
-
- String mcpDir = "$project.gradle.gradleUserHomeDir/caches/minecraft/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion"
- String mcpZIP = "$mcpDir/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip"
- String paramsCSV = "$mcpDir/params.csv"
-
- download.run {
- src "https://maven.minecraftforge.net/de/oceanlabs/mcp/mcp_$channel/$mappingsVersion-$minecraftVersion/mcp_$channel-$mappingsVersion-${minecraftVersion}.zip"
- dest mcpZIP
- overwrite false
- }
-
- if (!file(paramsCSV).exists()) {
- println("Extracting MCP archive ...")
- copy {
- from(zipTree(mcpZIP))
- into(mcpDir)
- }
- }
-
- println("Parsing params.csv ...")
- Map params = new HashMap<>()
- Files.lines(Paths.get(paramsCSV)).forEach { line ->
- String[] cells = line.split(",")
- if (cells.length > 2 && cells[0].matches("p_i?\\d+_\\d+_")) {
- params.put(cells[0], cells[1])
- }
- }
-
- out.style(Style.Success).println("Modified ${replaceParams(file("$projectDir/src/main/java"), params)} files!")
- out.style(Style.Failure).println("Don't forget to verify that the code still works as before!\n It could be broken due to duplicate variables existing now\n or parameters taking priority over other variables.")
- }
-}
-
-static int replaceParams(File file, Map params) {
- int fileCount = 0
-
- if (file.isDirectory()) {
- for (File f : file.listFiles()) {
- fileCount += replaceParams(f, params)
- }
- return fileCount
- }
- println("Visiting ${file.getName()} ...")
- try {
- String content = new String(Files.readAllBytes(file.toPath()))
- int hash = content.hashCode()
- params.forEach { key, value ->
- content = content.replaceAll(key, value)
- }
- if (hash != content.hashCode()) {
- Files.write(file.toPath(), content.getBytes("UTF-8"))
- return 1
- }
- } catch (Exception e) {
- e.printStackTrace()
- }
- return 0
-}
-
-// Dependency Deobfuscation (Deprecated, use the new RFG API documented in dependencies.gradle)
-
-def deobf(String sourceURL) {
- try {
- URL url = new URL(sourceURL)
- String fileName = url.getFile()
-
- //get rid of directories:
- int lastSlash = fileName.lastIndexOf("/")
- if (lastSlash > 0) {
- fileName = fileName.substring(lastSlash + 1)
- }
- //get rid of extension:
- if (fileName.endsWith(".jar") || fileName.endsWith(".litemod")) {
- fileName = fileName.substring(0, fileName.lastIndexOf("."))
- }
-
- String hostName = url.getHost()
- if (hostName.startsWith("www.")) {
- hostName = hostName.substring(4)
- }
- List parts = Arrays.asList(hostName.split("\\."))
- Collections.reverse(parts)
- hostName = String.join(".", parts)
-
- return deobf(sourceURL, "$hostName/$fileName")
- } catch (Exception ignored) {
- return deobf(sourceURL, "deobf/${sourceURL.hashCode()}")
- }
-}
-
-def deobfMaven(String repoURL, String mavenDep) {
- if (!repoURL.endsWith("/")) {
- repoURL += "/"
- }
- String[] parts = mavenDep.split(":")
- parts[0] = parts[0].replace('.', '/')
- def jarURL = repoURL + parts[0] + "/" + parts[1] + "/" + parts[2] + "/" + parts[1] + "-" + parts[2] + ".jar"
- return deobf(jarURL)
-}
-
-def deobfCurse(String curseDep) {
- return dependencies.rfg.deobf("curse.maven:$curseDep")
-}
-
-// The method above is to be preferred. Use this method if the filename is not at the end of the URL.
-def deobf(String sourceURL, String rawFileName) {
- String bon2Version = "2.5.1"
- String fileName = URLDecoder.decode(rawFileName, "UTF-8")
- String cacheDir = "$project.gradle.gradleUserHomeDir/caches"
- String obfFile = "$cacheDir/modules-2/files-2.1/${fileName}.jar"
-
- download.run {
- src sourceURL
- dest obfFile
- quiet true
- overwrite false
- }
- return dependencies.rfg.deobf(files(obfFile))
-}
-// Helper methods
-
-def checkPropertyExists(String propertyName) {
- if (!project.hasProperty(propertyName)) {
- throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/gradle.properties")
- }
-}
-
-def propertyDefaultIfUnset(String propertyName, defaultValue) {
- if (!project.hasProperty(propertyName) || project.property(propertyName) == "") {
- project.ext.setProperty(propertyName, defaultValue)
- }
-}
-
-def getFile(String relativePath) {
- return new File(projectDir, relativePath)
-}
-
-def getSecondaryArtifacts() {
- // Because noPublishedSources from the beginning of the script is somehow not visible here...
- boolean noPublishedSources = project.hasProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
- def secondaryArtifacts = [publishableDevJar]
- if (!noPublishedSources) secondaryArtifacts += [sourcesJar]
- if (apiPackage) secondaryArtifacts += [apiJar]
- return secondaryArtifacts
-}
-
-// For easier scripting of things that require variables defined earlier in the buildscript
-if (file('addon.late.gradle.kts').exists()) {
- apply from: 'addon.late.gradle.kts'
-} else if (file('addon.late.gradle').exists()) {
- apply from: 'addon.late.gradle'
-}
-
-// File for local tweaks not commited to Git
-if (file('addon.late.local.gradle.kts').exists()) {
- apply from: 'addon.late.local.gradle.kts'
-} else if (file('addon.late.local.gradle').exists()) {
- apply from: 'addon.late.local.gradle'
-}
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 00000000..944a269b
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,4 @@
+
+plugins {
+ id("com.gtnewhorizons.gtnhconvention")
+}
diff --git a/dependencies.gradle b/dependencies.gradle
index 2ddfb724..692d89a8 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -34,13 +34,15 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
- // Of course include the latest/SNAPSHOT version of GT6.
- compile "com.gregoriust.gregtech:gregtech_1.7.10:6.17.02:dev"
+ //runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.69-GTNH:dev")
+
+ // Of course include a recent version of GT6.
+ api "com.gregoriust.gregtech:gregtech_1.7.10:6.17.02:dev"
// These default dependencies are required to use the basics of GT6's API. Some
// other usages may require more dependencies to be enabled.
- compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
- compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
- compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
+ api "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
+ api "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
+ api "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
compileOnly "ic2:IC2Classic:1.2.1.8:dev"
@@ -140,11 +142,11 @@ dependencies {
//compileOnly 'org.apache.commons:commons-math3:3.2' // Needed for dev opis because it doesn't know how to specify dependencies properly
//compileOnly 'org.jfree:jcommon:1.0.21' // Needed for dev opis because it doesn't know how to specify dependencies properly
//compileOnly 'org.jfree:jfreechart:1.0.17' // Needed for dev opis because it doesn't know how to specify dependencies properly
-// compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
-// compileOnly "com.hbm:hbm:1.0.27:dev"
-// api("com.github.GTNewHorizons:ModularUI2:2.0.6-1.7.10:dev")
-// api "com.gregoriust.gregtech:gregtech_1.7.10:6.16.02:dev"
-// api 'com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev'
+ //compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
+ //compileOnly "com.hbm:hbm:1.0.27:dev"
+ //api("com.github.GTNewHorizons:ModularUI2:2.0.6-1.7.10:dev")
+ //api "com.gregoriust.gregtech:gregtech_1.7.10:6.16.02:dev"
+ //api 'com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev'
//compile(fileTree("libs/gregtech_1.7.10-6.16.02-dev.jar"))
//compileOnly "team.chisel.ctmlib:CTMLib:MC1.7.10-1.4.1.5:deobf"
//compileOnly "team.chisel:Chisel:2.9.5.12:deobf"
@@ -152,26 +154,27 @@ dependencies {
//compileOnly "maven.modrinth:baubles-expanded:2.1.4"
//compileOnly fileTree("libs/Techguns.beta.1.2_alphatest4.1.jar")
//api("com.github.GTNewHorizons:ModularUI2:2.0.6-1.7.10:dev"
-// compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
-// compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
-// compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
-// compileOnly "ic2:IC2Classic:1.2.1.8:dev"
-//
-// compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
-// compileOnly "blusunrize:ImmersiveEngineering:0.7.7:deobf"
-// api "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
-// api "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
+ //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
+ //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
+ //compileOnly "micdoodle8.mods:Galacticraft-Planets:1.7-3.0.12.504:Dev"
+ //compileOnly "ic2:IC2Classic:1.2.1.8:dev"
+ //
+ //compileOnly "twilightforest:twilightforest:1.7.10-2.3.8dev:dev"
+ //compileOnly "blusunrize:ImmersiveEngineering:0.7.7:deobf"
+ //api "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev"
+ //api "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev"
//api 'com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev'
-// api "com.github.GTNewHorizons:NotEnoughItems:2.3.82-GTNH:dev"
- // compile "curse.maven:techguns-244201:2429662"
+ //api "com.github.GTNewHorizons:NotEnoughItems:2.3.82-GTNH:dev"
+ //compile "curse.maven:techguns-244201:2429662"
-// compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
-// compileOnly "ic2:IC2Classic:1.2.1.8:dev"
-// compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
-// compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
-// compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
-// compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
-// compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
-// compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
+ //compileOnly "applecore:AppleCore:1.7.10-3.1.1:deobf"
+ //compileOnly "ic2:IC2Classic:1.2.1.8:dev"
+ //compileOnly "micdoodle8.mods:GalacticraftCore:1.7-3.0.12.504:Dev"
+ //compileOnly "micdoodle8.mods:MicdoodleCore:1.7-3.0.12.504:Dev"
+ //compileOnly "openblocks:OpenBlocks:1.7.10-1.6-1.7.10:deobf"
+ //compileOnly "openmods:OpenModsLib:1.7.10-0.10:deobf"
+ //compileOnly "vazkii.botania:Botania:r1.8-250:deobf"
+ //compileOnly "com.mod-buildcraft:buildcraft:7.1.23:dev"
+
}
diff --git a/gradle.properties b/gradle.properties
index 16cf69cd..1f951d08 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,43 +1,126 @@
-modName=GregTech 6 eXtended
-modId=gt6x
-modGroup=org.altadoon.gt6x
+# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
+# LOCAL to test local config updates.
+gtnh.settings.blowdryerTag = 0.2.2
+
+# Human-readable mod name, available for mcmod.info population.
+modName = GregTech 6 eXtended
+
+# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
+# Conventionally lowercase.
+modId = gt6x
+
+# Root package of the mod, used to find various classes in other properties,
+# mcmod.info substitution, enabling assertions in run tasks, etc.
+modGroup = org.altadoon.gt6x
+
+# Whether to use modGroup as the maven publishing group.
+# When false, com.github.GTNewHorizons is used.
+useModGroupForPublishing = true
+
+# Updates your build.gradle and settings.gradle automatically whenever an update is available.
autoUpdateBuildScript = false
+
+# Version of Minecraft to target
minecraftVersion = 1.7.10
+
+# Version of Minecraft Forge to target
forgeVersion = 10.13.4.1614
-developmentEnvironmentUserName = Developer
+
+# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
channel = stable
+
+# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
mappingsVersion = 12
-remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
-enableModernJavaSyntax = true
-# Enables injecting missing generics into the decompiled source code for a better coding experience
-# Turns most publicly visible List, Map, etc. into proper List, Map types
+
+# Defines other MCP mappings for dependency deobfuscation.
+remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
+
+# Select a default username for testing your mod. You can always override this per-run by running
+# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
+developmentEnvironmentUserName = Developer
+
+# Enables modern Java syntax support. Valid values:
+# - false: No modern syntax, Java 8 only
+# - jabel: Jabel syntax-only support, compiles to J8 bytecode
+# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
+# - modern: Native modern Java bytecode, no downgrading
+enableModernJavaSyntax = jabel
+
+# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
+# and should *not* be used in most situations. -1 disables this.
+# forceToolchainVersion = -1
+
+# Target JVM version for JVM Downgrader bytecode downgrading.
+# Only used when enableModernJavaSyntax = jvmDowngrader
+# downgradeTargetVersion = 8
+
+# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
+# Classes will be available in META-INF/versions/N/ for each version N in this list.
+# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
+# jvmDowngraderMultiReleaseVersions = 21,25
+
+# Specifies how JVM Downgrader API stubs are provided. Options:
+# - shade: Shade minimized stubs into the jar
+# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
+# - external: Another dependency provides stubs (no constraint, no warning)
+# - (empty): Warning reminding you to configure stubs
+# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
+# jvmDowngraderStubsProvider =
+
+# Enables injecting missing generics into the decompiled source code for a better coding experience.
+# Turns most publicly visible List, Map, etc. into proper List, Map types.
enableGenericInjection = false
-replaceGradleTokenInFile=Gt6xMod.java
-gradleTokenModId = GRADLETOKEN_MODID
-gradleTokenModName = GRADLETOKEN_MODNAME
-gradleTokenVersion = GRADLETOKEN_VERSION
-gradleTokenGroupName = GRADLETOKEN_GROUPNAME
+
+# Generate a class with a String field for the mod version named as defined below.
+# If generateGradleTokenClass is empty or not missing, no such class will be generated.
+# If gradleTokenVersion is empty or missing, the field will not be present in the class.
+generateGradleTokenClass = org.altadoon.gt6x.Tags
+
+# Name of the token containing the project's current version to generate/replace.
+gradleTokenVersion = VERSION
+
+# [DEPRECATED]
+# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
+# public static final String VERSION = "GRADLETOKEN_VERSION";
+# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
+# version in @Mod([...], version = VERSION, [...]).
+# Leave these properties empty to skip individual token replacements.
+replaceGradleTokenInFile =
+
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
-# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
+# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
apiPackage =
+
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
-# There can be multiple files in a comma-separated list.
-# Example value: mymodid_at.cfg,nei_at.cfg
-accessTransformersFile=
+# There can be multiple files in a space-separated list.
+# Example value: mymodid_at.cfg nei_at.cfg
+accessTransformersFile =
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
-# Adds some debug arguments like verbose output and export
+
+# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
+# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
+# Mixin classes will have access to "main" classes, but not the other way around.
+separateMixinSourceSet =
+
+# Adds some debug arguments like verbose output and class export.
usesMixinDebug = false
+
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
mixinPlugin =
-# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
+
+# Specify the package that contains all of your Mixins. The package must exist or
+# the build will fail. If you have a package property defined in your mixins..json,
+# it must match with this 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 compatibility only
-# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
+# 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
@@ -45,28 +128,38 @@ containsMixinsAndOrCoreModOnly = false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins = false
-# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
-# responsibility check the licence and request permission for distribution, if required.
+# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
+# responsibility to check the license and request permission for distribution if required.
usesShadowedDependencies = false
-# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
+
+# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies = true
+
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies = true
-# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories
+# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
includeWellKnownRepositories = true
+# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
+# list of strings, with the acceptable keys being(case does not matter):
+# cursemaven
+# modrinth
+excludeWellKnownRepositories =
+
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
-# Authenticate with the MAVEN_USERNAME and MAVEN_PASSWORD environment variables.
+# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
usesMavenPublishing = true
-# mavenPublishUrl = http://jenkins.usrv.eu:8081/nexus/content/repositories/releases
-# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token.
+# Maven repository to publish the mod to.
+# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
+# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
+#
# The project's ID on Modrinth. Can be either the slug or the ID.
-# Leave this empty if you don't want to publish on Modrinth.
+# Leave this empty if you don't want to publish to Modrinth.
modrinthProjectId =
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
@@ -75,12 +168,11 @@ modrinthProjectId =
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
-# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
+# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
modrinthRelations =
-
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
-
+#
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
curseForgeProjectId =
@@ -90,26 +182,48 @@ curseForgeProjectId =
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
-# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
+# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
curseForgeRelations =
-
-# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
+# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
# projects. New projects should not use this parameter.
# customArchiveBaseName =
-# Optional parameter to prevent the source code from being published
-# noPublishedSources =
+# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
+# runClientWorkingDirectory = run/client
+
+# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
+# runServerWorkingDirectory = run/server
+
+# Optional parameter to have the build automatically fail if an illegal version is used.
+# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
+# The check is ONLY performed if the version is a git tag.
+# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
+# versionPattern =
+
+# Uncomment to prevent the source code from being published.
+# noPublishedSources = true
-# Uncomment this to disable spotless checks
+# Uncomment this to disable Spotless checks.
# This should only be uncommented to keep it easier to sync with upstream/other forks.
# That is, if there is no other active fork/upstream, NEVER change this.
disableSpotless = true
-# Override the IDEA build type. Valid value is "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
+# Uncomment this to disable Checkstyle checks (currently wildcard import check).
+disableCheckstyle = true
+
+# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
# (force use delegated build).
# This is meant to be set in $HOME/.gradle/gradle.properties.
-# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be always native build.
+# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
# ideaOverrideBuildType = idea
+
+# Whether IDEA should run spotless checks when pressing the Build button.
+# This is meant to be set in $HOME/.gradle/gradle.properties.
+# ideaCheckSpotlessOnBuild = true
+
+# Non-GTNH properties
+org.gradle.configuration-cache = true
+org.gradle.parallel = true
diff --git a/gradle/gradle-daemon-jvm.properties b/gradle/gradle-daemon-jvm.properties
new file mode 100644
index 00000000..b30b5507
--- /dev/null
+++ b/gradle/gradle-daemon-jvm.properties
@@ -0,0 +1,12 @@
+#This file is generated by updateDaemonJvm
+toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
+toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
+toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
+toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
+toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
+toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
+toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
+toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
+toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
+toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
+toolchainVersion=25
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 033e24c4..f8e1ee31 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 9f4197d5..37f78a6a 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index fcb6fca1..adff685a 100755
--- a/gradlew
+++ b/gradlew
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright © 2015-2021 the original authors.
+# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+# SPDX-License-Identifier: Apache-2.0
+#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -111,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -144,7 +146,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +154,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -169,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -201,16 +202,15 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
- org.gradle.wrapper.GradleWrapperMain \
+ -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
diff --git a/gradlew.bat b/gradlew.bat
index 93e3f59f..c4bdd3ab 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -57,22 +59,21 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/repositories.gradle b/repositories.gradle
index 06043f2c..7e002f2b 100644
--- a/repositories.gradle
+++ b/repositories.gradle
@@ -1,20 +1,5 @@
-// Add any additional repositories for your dependencies here
+// Add any additional repositories for your dependencies here.
repositories {
- maven {
- name = "gt"
- url = "http://gregtech.mechaenetia.com/"
- }
- maven {
- name 'GTNH Maven'
- url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
- allowInsecureProtocol
- }
- maven {
- name = "Modrinth"
- url = "https://api.modrinth.com/maven"
- }
- maven {
- url "https://cursemaven.com"
- }
+
}
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index e3343972..00000000
--- a/settings.gradle
+++ /dev/null
@@ -1,28 +0,0 @@
-
-pluginManagement {
- repositories {
- maven {
- // RetroFuturaGradle
- name "GTNH Maven"
- url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
- allowInsecureProtocol = true
- mavenContent {
- includeGroup("com.gtnewhorizons.retrofuturagradle")
- }
- }
- gradlePluginPortal()
- mavenCentral()
- mavenLocal()
- }
-}
-
-plugins {
- id 'com.diffplug.blowdryerSetup' version '1.6.0'
- id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
-}
-
-blowdryerSetup {
- repoSubfolder 'gtnhShared'
- github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.2.2')
- //devLocal '.' // Use this when testing config updates locally
-}
diff --git a/settings.gradle.kts b/settings.gradle.kts
new file mode 100644
index 00000000..c1ffed14
--- /dev/null
+++ b/settings.gradle.kts
@@ -0,0 +1,21 @@
+
+pluginManagement {
+ repositories {
+ maven {
+ // RetroFuturaGradle
+ name = "GTNH Maven"
+ url = uri("https://nexus.gtnewhorizons.com/repository/public/")
+ mavenContent {
+ includeGroup("com.gtnewhorizons")
+ includeGroupByRegex("com\\.gtnewhorizons\\..+")
+ }
+ }
+ gradlePluginPortal()
+ mavenCentral()
+ mavenLocal()
+ }
+}
+
+plugins {
+ id("com.gtnewhorizons.gtnhsettingsconvention") version("2.0.20")
+}
diff --git a/src/main/java/org/altadoon/gt6x/Gt6xMod.java b/src/main/java/org/altadoon/gt6x/Gt6xMod.java
index 0cbc146a..0c796938 100644
--- a/src/main/java/org/altadoon/gt6x/Gt6xMod.java
+++ b/src/main/java/org/altadoon/gt6x/Gt6xMod.java
@@ -33,10 +33,10 @@
*/
@cpw.mods.fml.common.Mod(modid= Gt6xMod.MOD_ID, name= Gt6xMod.MOD_NAME, version= Gt6xMod.VERSION, dependencies="required-after:gregapi_post;after:"+ CS.ModIDs.GT)
public final class Gt6xMod extends gregapi.api.Abstract_Mod {
- public static final String MOD_ID = "GRADLETOKEN_MODID";
- public static final String MOD_NAME = "GRADLETOKEN_MODNAME";
- public static final String VERSION = "GRADLETOKEN_VERSION";
- public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME";
+ public static final String MOD_ID = "gt6x";
+ public static final String MOD_NAME = "GregTech 6 eXtended";
+ public static final String VERSION = Tags.VERSION;
+ public static final String GROUPNAME = "org.altadoon.gt6x";
public static gregapi.code.ModData MOD_DATA = new gregapi.code.ModData(MOD_ID, MOD_NAME);
@cpw.mods.fml.common.SidedProxy(modId = MOD_ID, clientSide = "gregapi.api.example.Example_Proxy_Client", serverSide = "gregapi.api.example.Example_Proxy_Server")