Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
fix: 1.20.5 breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
null2264 committed Mar 19, 2024
1 parent 8f1a2df commit 5a819ff
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
29 changes: 22 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ static String stringifyVersion(int ver) {
return "${(int)(ver/10000)}.${(int)(ver/100)%100}" + (ver%100==0 ? '' : ".${ver%100}")
}
def mcVersionStr = stringifyVersion(mcVersion)
// TODO(addingVersion)
def supportedVersionRange = [
11800: ["1.18", "1.20.1"],
12002: ["1.20.2", null],
11800: ["1.18-", "1.20.1"],
12002: ["1.20.2-", "1.20.4"],
12005: ["1.20.5-", null]
][mcVersion]

def buildNumber = _env["GITHUB_RUN_NUMBER"]
Expand Down Expand Up @@ -65,14 +67,17 @@ configurations {
}

dependencies {
// TODO(addingVersion): If needed
def mc = [
11800: "1.18.2"
11800: "1.18.2",
12005: "24w11a"
]
minecraft("com.mojang:minecraft:${mc[mcVersion] ?: mcVersionStr}")
mappings loom.officialMojangMappings()
if (isFabric)
modImplementation("net.fabricmc:fabric-loader:0.14.24")
modImplementation("net.fabricmc:fabric-loader:0.15.7")
else {
// TODO(addingVersion)
if (!isNeo) {
forge("net.minecraftforge:forge:" + [
11800: "1.18.2-40.2.9",
Expand Down Expand Up @@ -143,9 +148,17 @@ jar {
}
}

// TODO(addingVersion)
def mcReleaseVersions = [
11800: ["1.18", "1.18.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1"],
12002: ["1.20.2", "1.20.3", "1.20.4"],
12005: ["1.20.5"],
][mcVersion]
def cfSnapshots = [
12005: ["1.20.5-Snapshot"],
][mcVersion]
def mrSnapshots = [
12005: ["24w11a"],
][mcVersion]

publishMods {
Expand All @@ -171,7 +184,8 @@ publishMods {
accessToken = cToken
projectId = project["curseforge_project"]

for (final def mcVer in mcReleaseVersions) {
def mcVersions = cfSnapshots == null ? mcReleaseVersions : cfSnapshots
for (final def mcVer in mcVersions) {
minecraftVersions.add(mcVer)
}
}
Expand All @@ -182,8 +196,9 @@ publishMods {
accessToken = mToken
projectId = project["modrinth_project"]

for (final def mcVer in mcReleaseVersions) {
def mcVersions = mrSnapshots == null ? mcReleaseVersions : mrSnapshots
for (final def mcVer in mcVersions) {
minecraftVersions.add(mcVer)
}
}
}
}
4 changes: 4 additions & 0 deletions root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ plugins {
}

preprocess {
//val neoforge12005 = createNode("1.20.5-neoforge", 12005, "mojang")
val neoforge12002 = createNode("1.20.2-neoforge", 12002, "mojang")

val forge12002 = createNode("1.20.2-forge", 12002, "mojang")
val forge11800 = createNode("1.18-forge", 11800, "mojang")

val fabric12005 = createNode("1.20.5-fabric", 12005, "mojang")
val fabric12002 = createNode("1.20.2-fabric", 12002, "mojang")
val fabric11800 = createNode("1.18-fabric", 11800, "mojang")

// In case CHASM released
//val quilt11800 = createNode("1.18-quilt", 11800, "yarn")

//neoforge12005.link(fabric12005)
neoforge12002.link(forge12002)

forge12002.link(fabric12002)
forge11800.link(fabric11800)

fabric12005.link(fabric12002)
fabric12002.link(fabric11800)
}
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ listOf(
"1.20.2-fabric",
"1.20.2-forge",
"1.20.2-neoforge",
"1.20.5-fabric",
).forEach { version ->
include(":$version")
project(":$version").apply {
projectDir = file("versions/$version")
buildFileName = "../../build.gradle"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public abstract class ServerPlayerEntityMixin
//$$ ((EntityAccessor) player).getEntityId(),
//#endif
instance
//#if MC>=1.20.5
//$$ ,false
//#endif
))
);
}
Expand Down
Empty file added versions/1.20.5-fabric/.gitkeep
Empty file.

0 comments on commit 5a819ff

Please sign in to comment.