diff --git a/1.16.5.properties b/1.16.5.properties index e0569c350..6d5ee998d 100644 --- a/1.16.5.properties +++ b/1.16.5.properties @@ -43,5 +43,4 @@ forge_version=36.2.28 enable_terraforged=2 # Quilt loader -quilt_loader_version=0.16.0-beta.8 -#quilt_api_version=1.0.0-beta.7+0.51.1-1.16.5 \ No newline at end of file +quilt_loader_version=0.16.0-beta.8 \ No newline at end of file diff --git a/1.17.1.properties b/1.17.1.properties index bdea203f3..c884ffccd 100644 --- a/1.17.1.properties +++ b/1.17.1.properties @@ -43,5 +43,4 @@ forge_version=37.1.1 enable_terraforged=0 # Quilt loader -quilt_loader_version=0.16.0-beta.8 -#quilt_api_version=1.0.0-beta.7+0.51.1-1.17.1 \ No newline at end of file +quilt_loader_version=0.16.0-beta.8 \ No newline at end of file diff --git a/1.18.1.properties b/1.18.1.properties index 5b38188ad..ab38d7adf 100644 --- a/1.18.1.properties +++ b/1.18.1.properties @@ -1,6 +1,6 @@ # 1.18.1 version -java_version = 17 +java_version=17 minecraft_version=1.18.1 parchment_version=2022.03.06 compatible_minecraft_versions=["1.18", "1.18.1"] @@ -43,5 +43,4 @@ forge_version=39.1.2 enable_terraforged=0 # Quilt loader -quilt_loader_version=0.16.0-beta.8 -quilt_api_version=1.0.0-beta.7+0.51.1-1.18.2 \ No newline at end of file +quilt_loader_version=0.16.0-beta.8 \ No newline at end of file diff --git a/1.18.2.properties b/1.18.2.properties index b5fb9b6a7..4d1e5446a 100644 --- a/1.18.2.properties +++ b/1.18.2.properties @@ -43,5 +43,4 @@ forge_version=40.0.18 enable_terraforged=0 # Quilt loader -quilt_loader_version=0.16.0-beta.8 -quilt_api_version=1.0.0-beta.7+0.51.1-1.18.2 \ No newline at end of file +quilt_loader_version=0.16.0-beta.8 \ No newline at end of file diff --git a/build.gradle b/build.gradle index 02b4579be..08708a32a 100644 --- a/build.gradle +++ b/build.gradle @@ -198,6 +198,28 @@ allprojects { p -> } + // Make a new author thing for quilt as quilt uses a different layout for their authors + // The output to look something like this {"James":"Developer","coolGi":"Developer} + def currentAuthor = "" + def quiltAuthors = "{" + def authorCounter = false; + for (reader in rootProject.mod_authors) { + if (authorCounter) + currentAuthor = currentAuthor + reader + + if (reader == "\"") { + authorCounter = !authorCounter + if (!authorCounter) { + currentAuthor = currentAuthor.substring(0, currentAuthor.length() - 1); // Delete the qotation mark at the end of the authors name + quiltAuthors = quiltAuthors + "\"" + currentAuthor + "\":\"Developer\"" + "," // Add the author to the string + currentAuthor = "" + } + } + } + quiltAuthors.substring(0, quiltAuthors.length() - 1); // Delete the final comma + quiltAuthors = quiltAuthors + "}"; + + // Put stuff from gradle.properties into the mod info processResources { def resourceTargets = ["fabric.mod.json", "quilt.mod.json", "META-INF/mods.toml"] // Location of where to put @@ -206,6 +228,7 @@ allprojects { p -> version : mod_version, mod_name : mod_name, authors : mod_authors, + quilt_authors : quiltAuthors, description : mod_description, homepage : mod_homepage, source : mod_source, diff --git a/fabric/build.gradle b/fabric/build.gradle index 7847249c1..3c853091c 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -22,6 +22,12 @@ configurations { repositories { // Required for ModMenu maven { url "https://maven.terraformersmc.com/" } + + // Required for Quilt + maven { + name 'Quilt' + url 'https://maven.quiltmc.org/repository/release' + } } def addMod(path, enabled) { @@ -32,8 +38,13 @@ def addMod(path, enabled) { } dependencies { - // Fabric loader - modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" + if (rootProject.use_quilt_rather_than_fabric == "true") { + // Quilt loader + modImplementation "org.quiltmc:quilt-loader:${rootProject.quilt_loader_version}" + } else { + // Fabric loader + modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" + } // Fabric API addModJar(fabricApi.module("fabric-lifecycle-events-v1", rootProject.fabric_api_version)) diff --git a/fabric/src/main/resources/quilt.mod.json b/fabric/src/main/resources/quilt.mod.json index 40f9102b3..aa1c76bf0 100644 --- a/fabric/src/main/resources/quilt.mod.json +++ b/fabric/src/main/resources/quilt.mod.json @@ -4,13 +4,11 @@ "group": "com.seibel.lod", "id": "lod", "version": "${version}", + "environment": "client", "metadata": { "name": "${mod_name}", "description": "${description}", - "contributors": { - "This needs to be": "an object", - "I Already Don't Like": "Quilt" - }, + "contributors": ${quilt_authors}, "icon": "icon.png" }, "entrypoints": { @@ -42,4 +40,4 @@ }, "mixin": "fabric.lod.mixins.json", "accessWidener" : "lod.accesswidener" - } \ No newline at end of file +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d122baa23..55583e6b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,6 +4,9 @@ org.gradle.daemon=false maven_group=com.seibel.lod archives_base_name=DistantHorizons +# Switch fabric to quilt on the fabric folder +use_quilt_rather_than_fabric=false + # Mod info mod_version=1.6.3a-dev mod_name=Distant Horizons