From 95dc259c48c48f1430e45424152ae5a18ff95355 Mon Sep 17 00:00:00 2001 From: samolego <34912839+samolego@users.noreply.github.com> Date: Tue, 19 Jan 2021 20:35:44 +0100 Subject: [PATCH] Minor updates, still no luck --- build.gradle | 24 +++++++++++++++++++----- fabric/build.gradle | 12 ++++++------ forge/src/main/resources/pack.mcmeta | 2 +- gradle.properties | 10 +++++----- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index bd09074..bb79113 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,18 @@ plugins { - id "architectury-plugin" version "1.3.44" - id "forgified-fabric-loom" version "0.5.25" apply false + id "architectury-plugin" version "1.3.54" + id "forgified-fabric-loom" version "0.6.45" apply false } -architect { +architectury { minecraft = rootProject.minecraft_version } subprojects { apply plugin: "forgified-fabric-loom" - apply plugin: "architectury-plugin" + loom { + silentMojangMappingsLicense() + } } allprojects { @@ -23,5 +25,17 @@ allprojects { tasks.withType(JavaCompile) { options.encoding = "UTF-8" + + // The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too + // JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. + // We'll use that if it's available, but otherwise we'll use the older option. + def targetVersion = 8 + if (JavaVersion.current().isJava9Compatible()) { + options.release = 8 + } } -} \ No newline at end of file + + java { + withSourcesJar() + } +} diff --git a/fabric/build.gradle b/fabric/build.gradle index b442b14..8aa970b 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -21,12 +21,12 @@ architectury { } dependencies { - minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" + minecraft("com.mojang:minecraft:${rootProject.minecraft_version}") mappings("net.fabricmc:yarn:${rootProject.yarn_mappings}:v2") - modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}" - - // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}" + modImplementation("net.fabricmc:fabric-loader:${rootProject.loader_version}") + modImplementation("net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}") + // Remove the next line if you don't want to depend on the API + modImplementation("me.shedaniel:architectury:${rootProject.architectury_version}:fabric") compileOnly(project(path: ":common")) { transitive = false @@ -64,5 +64,5 @@ shadowJar { remapJar { dependsOn(shadowJar) input.set(shadowJar.archivePath) - archiveClassifier = "fabric" + classifier "fabric" } diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta index 06ca035..ba969b9 100644 --- a/forge/src/main/resources/pack.mcmeta +++ b/forge/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "Example Mod", + "description": "SimpleAuth", "pack_format": 6 } } diff --git a/gradle.properties b/gradle.properties index 68847b8..57a3d20 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,15 +2,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric properties -minecraft_version=1.16.4 -yarn_mappings=1.16.4+build.7 -loader_version=0.10.8 +minecraft_version=1.16.5 +yarn_mappings=1.16.5+build.1 +loader_version=0.11.1 #Fabric api -fabric_version=0.28.0+1.16 +fabric_version=0.29.3+1.16 # Forge -forge_version = 35.1.0 +forge_version=36.0.1 # Mod Properties