Skip to content

Commit

Permalink
Update build to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed May 3, 2024
1 parent 5bed3a9 commit 13d310d
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 8 deletions.
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
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 {
mavenCentral()
}

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")
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
35 changes: 35 additions & 0 deletions src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 16 additions & 6 deletions version.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand All @@ -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"
Expand All @@ -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) {
Expand All @@ -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")
})
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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"
)) {
Expand All @@ -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 {
Expand Down

0 comments on commit 13d310d

Please sign in to comment.