From 13d310d5a96b0270eef06b6c212fbeaf64a89d2b Mon Sep 17 00:00:00 2001 From: "Josiah (Gaming32) Glosson" Date: Fri, 3 May 2024 14:54:38 -0500 Subject: [PATCH] Update build to 1.20.6 --- build.gradle.kts | 8 +++-- settings.gradle.kts | 2 ++ .../resources/META-INF/neoforge.mods.toml | 35 +++++++++++++++++++ src/main/resources/fabric.mod.json | 2 ++ version.gradle.kts | 22 ++++++++---- 5 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/META-INF/neoforge.mods.toml diff --git a/build.gradle.kts b/build.gradle.kts index 4d5f392..4282c68 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("dev.deftu.gradle.preprocess-root") version "0.4.2" - id("xyz.wagyourtail.unimined") version "1.2.0" apply false + id("xyz.wagyourtail.unimined") version "1.2.4" apply false } repositories { @@ -8,6 +8,8 @@ repositories { } preprocess { + val fabric12006 = createNode("1.20.6-fabric", 1_20_06, "yarn") + val neoforge12006 = createNode("1.20.6-neoforge", 1_20_06, "yarn") val fabric12004 = createNode("1.20.4-fabric", 1_20_04, "yarn") val neoforge12004 = createNode("1.20.4-neoforge", 1_20_04, "yarn") val fabric12001 = createNode("1.20.1-fabric", 1_20_01, "yarn") @@ -21,7 +23,9 @@ preprocess { val fabric11701 = createNode("1.17.1-fabric", 1_17_01, "yarn") val forge11701 = createNode("1.17.1-forge", 1_17_01, "srg") - fabric12004.link(neoforge12004) + fabric12006.link(neoforge12006) + neoforge12006.link(neoforge12004) + neoforge12004.link(fabric12004) fabric12004.link(fabric12001) fabric12001.link(forge12001) forge12001.link(forge11904) diff --git a/settings.gradle.kts b/settings.gradle.kts index 4a57218..fdc6bdd 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -34,6 +34,8 @@ listOf( "1.20.1-fabric", "1.20.4-neoforge", "1.20.4-fabric", + "1.20.6-neoforge", + "1.20.6-fabric", ).forEach { version -> include(":$version") project(":$version").apply { diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..401189f --- /dev/null +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,35 @@ +modLoader = "javafml" +loaderVersion = "[3,)" +license = "MIT" +issueTrackerURL = "https://github.com/Gaming32/bingo/issues" + +[[mods]] +modId = "world_host" +namespace = "world-host" +version = "$version" +displayName = "World Host" +displayURL = "https://modrinth.com/mod/world-host" +logoFile = "icon.png" +authors = "Gaming32" +description = "Host your singleplayer worlds without having to run a server or setup port forwarding! In the future, we also plan to support Bedrock Edition clients through the use of Geyser." + +[[mixins]] +config = "world-host.mixins.json" + +[[dependencies.world_host]] +modId = "neoforge" +versionRange = "[20,)" +type = "required" +ordering = "NONE" +side = "BOTH" + +[[dependencies.world_host]] +modId = "minecraft" +##if MC == 1.20.6 +#?? versionRange = "[1.20.5,1.20.7)" +##else +#?? versionRange = "$mc_version" +##endif +type = "required" +ordering = "NONE" +side = "BOTH" diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b19eff6..5f04028 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,6 +34,8 @@ //?? "minecraft": ">=1.20- <1.20.2", //#elseif MC == 1.20.4 "minecraft": ">=1.20.3- <1.20.5", + //#elseif MC == 1.20.6 + //?? "minecraft": ">=1.20.5- <1.20.7", //#else //?? "minecraft": "$mc_version", //#endif diff --git a/version.gradle.kts b/version.gradle.kts index a6581a0..6f98285 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -47,7 +47,7 @@ repositories { unimined.minecraft { version(mcVersionString) - if (mcVersion != 1_20_01 || !isForge) { + if ((mcVersion != 1_20_01 || !isForge) && mcVersion < 1_20_05) { side("client") } @@ -56,6 +56,7 @@ unimined.minecraft { searge() mojmap() when { + mcVersion >= 1_20_05 -> "1.20.6:2024.05.01" mcVersion >= 1_20_04 -> "1.20.4:2024.04.14" mcVersion >= 1_20_03 -> "1.20.3:2023.12.31" mcVersion >= 1_20_02 -> "1.20.2:2023.12.10" @@ -76,11 +77,13 @@ unimined.minecraft { c("net/minecraft/client/gui/chat/NarratorChatListener", "net/minecraft/client/GameNarrator") } } + + devFallbackNamespace("official") } when { isFabric -> fabric { - loader("0.14.22") + loader("0.15.1") } isForge -> minecraftForge { loader(when(mcVersion) { @@ -95,6 +98,7 @@ unimined.minecraft { } isNeoForge -> neoForged { loader(when (mcVersion) { + 1_20_06 -> "21-beta" 1_20_04 -> "69-beta" else -> throw IllegalStateException("Unknown NeoForge version for $mcVersionString") }) @@ -219,6 +223,7 @@ dependencies { if (isFabric) { when (mcVersion) { + 1_20_06 -> "10.0.0-beta.1" 1_20_04 -> "9.0.0" 1_20_01 -> "7.2.2" 1_19_04 -> "6.3.1" @@ -240,6 +245,7 @@ dependencies { if (isFabric) { when (mcVersion) { + 1_20_06 -> "0.97.5+1.20.5" 1_20_04 -> "0.91.1+1.20.3" 1_20_01 -> "0.91.0+1.20.1" 1_19_04 -> "0.87.2+1.19.4" @@ -309,12 +315,10 @@ modrinth { 1_19_04 -> "23w13a_or_b" 1_20_01 -> "1.20" 1_20_04 -> "1.20.3" + 1_20_06 -> "1.20.5" else -> null }?.let(gameVersions::add) loaders.add(loaderName) - if (isFabric) { - loaders.add("quilt") - } dependencies { if (isFabric) { optional.project("modmenu") @@ -363,6 +367,7 @@ tasks.processResources { "fabric.mod.json", "quilt.mod.json", "META-INF/mods.toml", + "META-INF/neoforge.mods.toml", "mixins.*.json", "*.mixins.json" )) { @@ -374,9 +379,14 @@ tasks.processResources { } if (isFabric) { - exclude("pack.mcmeta", "META-INF/mods.toml") + exclude("pack.mcmeta", "META-INF/mods.toml", "META-INF/neoforge.mods.toml") } else { exclude("fabric.mod.json") + if (isNeoForge && mcVersion >= 1_20_05) { + exclude("META-INF/mods.toml") + } else { + exclude("META-INF/neoforge.mods.toml") + } } doLast {