Skip to content

Commit

Permalink
Support MInecraft 1.20.2
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrix-Shen <[email protected]>
  • Loading branch information
Hendrix-Shen committed Sep 23, 2023
1 parent e831aa6 commit cc61506
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 46 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ jobs:
1.19.3
1.19.4
1.20.1
version-resolver: latest
1.20.2
version-resolver: any
java: |
8
9
Expand Down Expand Up @@ -248,7 +249,8 @@ jobs:
1.19.3
1.19.4
1.20.1
version-resolver: latest
1.20.2
version-resolver: any
java: |
8
9
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The default hotkey to open the in-game config GUI is **T + C**.
|--------------------------|----------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| Auth Me | Optional | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/auth-me) &#124; [Github](https://github.com/axieum/authme) |
| In-Game Account Switcher | Optional | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/in-game-account-switcher) |
| MagicLib | Required | \>=0.7.336 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/magiclib) &#124; [Github](https://github.com/Hendrix-Shen/MagicLib) |
| MagicLib | Required | \>=0.7.387 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/magiclib) &#124; [Github](https://github.com/Hendrix-Shen/MagicLib) |
| MaliLib | Required | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/malilib) &#124; [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=malilib) |
| Litematica | Optional | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/litematica) &#124; [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=litematica) |
| ReAuth (Fabric) | Optional | Any | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/reauth-fabric) |
Expand All @@ -43,10 +43,11 @@ And use `preprocess` to be compatible with all versions.
- Minecraft 1.16.5
- Minecraft 1.17.1
- Minecraft 1.18.2
- Minecraft 1.19.2
- Minecraft 1.19.3
- Minecraft 1.19.2 (Ending support soon)
- Minecraft 1.19.3 (Ending support soon)
- Minecraft 1.19.4
- Minecraft 1.20.1
- Minecraft 1.20.1 (Ending support soon)
- Minecraft 1.20.2

### Mappings

Expand Down
9 changes: 5 additions & 4 deletions README_ZH_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
|--------------------------|-----|------------|----------------------------------------------------------------------------------------------------------------------------------------------------|
| Auth Me | 可选 | 任意 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/auth-me) &#124; [Github](https://github.com/axieum/authme) |
| In-Game Account Switcher | 可选 | 任意 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/in-game-account-switcher) |
| MagicLib | 必须 | \>=0.7.336 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/magiclib) &#124; [Github](https://github.com/Hendrix-Shen/MagicLib) |
| MagicLib | 必须 | \>=0.7.387 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/magiclib) &#124; [Github](https://github.com/Hendrix-Shen/MagicLib) |
| MaliLib | 必须 | 任意 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/malilib) &#124; [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=malilib) |
| Litematica | 可选 | 任意 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/litematica) &#124; [Masa WebSite](https://masa.dy.fi/mcmods/client_mods/?mod=litematica) |
| ReAuth (Fabric) | 可选 | 任意 | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/reauth-fabric) |
Expand All @@ -43,10 +43,11 @@
- Minecraft 1.16.5
- Minecraft 1.17.1
- Minecraft 1.18.2
- Minecraft 1.19.2
- Minecraft 1.19.3
- Minecraft 1.19.2 (即将终止支持)
- Minecraft 1.19.3 (即将终止支持)
- Minecraft 1.19.4
- Minecraft 1.20.1
- Minecraft 1.20.1 (即将终止支持)
- Minecraft 1.20.2

### 混淆映射表

Expand Down
32 changes: 22 additions & 10 deletions fabricWrapper/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import groovy.json.JsonBuilder
import groovy.json.JsonSlurper

plugins {
id("java-library")
Expand Down Expand Up @@ -49,32 +50,43 @@ jar {
processResources {
// disable cache
outputs.upToDateWhen { false }
ArrayList<?> mc_condition = []
ArrayList<?> jars = []

fabric_subprojects.each({
mc_condition.add("${it.minecraft_dependency}")
jars.add(["file": "META-INF/jars/${project.mod_archives_base_name}-${it.minecraft_version}-${project.version}.jar"])
})

from("${rootDir}/icon.png") {
into("assets/${project.mod_id}")
}

filesMatching("fabric.mod.json") {
expand([
"minecraft_dependency": new JsonBuilder(mc_condition),
"magiclib_dependency" : project.magiclib_dependency,
"mod_description" : project.mod_description,
"mod_homepage" : project.mod_homepage,
"mod_id" : project.mod_id,
"mod_license" : project.mod_license,
"mod_name" : project.mod_name,
"mod_version" : project.version,
"mod_sources" : project.mod_sources,
"sub_jars" : new JsonBuilder(jars).toPrettyString(),
"mod_sources" : project.mod_sources
])
}

doLast {
ArrayList<?> mc_condition = []
ArrayList<?> jars = []

fabric_subprojects.each({
mc_condition.add("${it.minecraft_dependency}")
jars.add(["file": "META-INF/jars/${project.mod_archives_base_name}-${it.minecraft_version}-${project.version}.jar"])
})

File file = file("build/resources/main/fabric.mod.json")
JsonSlurper slurper = new JsonSlurper()
JsonBuilder builder = new JsonBuilder(slurper.parse(file))
builder.content.depends.minecraft = mc_condition
builder.content.jars = jars
BufferedWriter writer = file.newWriter()
writer.append(builder.toPrettyString())
writer.flush()
writer.close()
}
}

java {
Expand Down
6 changes: 2 additions & 4 deletions fabricWrapper/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@
},
"depends": {
"magiclib": ">=${magiclib_dependency}",
"malilib": "*",
"minecraft": ${minecraft_dependency}
"malilib": "*"
},
"custom": {
"modmenu:clientsideOnly": true
},
"jars": ${sub_jars}
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ fabric_installer_version=0.11.2
fabric_loader_version=0.14.22

# Annotation processor
lombok_version=1.18.28
lombok_version=1.18.30

# Required Libraries
# MagicLib - 0.7.384
magiclib_dependency=0.7.384+e9e3c4a-beta
magiclib_version=0.7.384+e9e3c4a-beta
# MagicLib - 0.7.387
magiclib_dependency=0.7.387
magiclib_version=0.7.387
5 changes: 2 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()

maven {
name("Fabric")
Expand All @@ -21,9 +23,6 @@ pluginManagement {
name("Cotton")
url("https://server.bbkr.space/artifactory/libs-release")
}

mavenCentral()
gradlePluginPortal()
}
}

Expand Down
10 changes: 5 additions & 5 deletions versions/1.20.1/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Independent branch configuration
# Development Environment
minecraft_version=1.20.1
minecraft_dependency=>1.20 <=1.20.1
minecraft_dependency=1.20.1

# Compatible Libraries
# Litematica - 0.15.0
# https://www.curseforge.com/minecraft/mc-mods/litematica/files/4593296
# litematica-fabric-1.20.1-0.15.0.jar
litematica_version=4593296
# Not Enough Crashes - 4.4.0
# https://www.curseforge.com/minecraft/mc-mods/not-enough-crashes/files/4587295
# notenoughcrashes-4.4.4+1.20.1-fabric.jar
not_enough_crashes_version=4587295
# Not Enough Crashes - 4.4.6
# https://www.curseforge.com/minecraft/mc-mods/not-enough-crashes/files/4684046
# notenoughcrashes-4.4.6+1.20.1-fabric.jar
not_enough_crashes_version=4684046
20 changes: 10 additions & 10 deletions versions/1.20.2/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Independent branch configuration
# Development Environment
minecraft_version=1.20.2-pre2
minecraft_dependency=1.20.2-beta.2
minecraft_version=1.20.2
minecraft_dependency=1.20.2

# Compatible Libraries
# Litematica - 1.20.2-pre1-0.15.3-nyan.5
# https://jitpack.io/#Nyan-Work/litematica/1.20.2-pre2.1
# litematica-1.20.2-pre2.1.jar
litematica_version=1.20.2-pre2.1
# Not Enough Crashes - 4.4.0
# https://www.curseforge.com/minecraft/mc-mods/not-enough-crashes/files/4587295
# notenoughcrashes-4.4.4+1.20.1-fabric.jar
not_enough_crashes_version=4587295
# Litematica - 0.15.3-nyan.6
# https://jitpack.io/#Nyan-Work/litematica/0.15.3-nyan.6
# litematica-0.15.3-nyan.6.jar
litematica_version=0.15.3-nyan.6
# Not Enough Crashes - 4.4.6
# https://www.curseforge.com/minecraft/mc-mods/not-enough-crashes/files/4762979
# notenoughcrashes-4.4.6+1.20.2-fabric.jar
not_enough_crashes_version=4762979

0 comments on commit cc61506

Please sign in to comment.