Skip to content

Commit

Permalink
Support Minecraft 1.20.4
Browse files Browse the repository at this point in the history
Signed-off-by: Hendrix-Shen <[email protected]>
  • Loading branch information
Hendrix-Shen committed Dec 16, 2023
1 parent af9a8a8 commit 08c8f70
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
1.19.4
1.20.1
1.20.2
1.20.4
version-resolver: any

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ ItemScroller 存储的配方编号,只支持 2x2 配方
- Minecraft 1.19.3 (即将终止支持)
- Minecraft 1.19.4
- Minecraft 1.20.1 (即将终止支持)
- Minecraft 1.20.2
- Minecraft 1.20.2 (即将终止支持)
- Minecraft 1.20.4

### 混淆映射表

Expand Down
3 changes: 2 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,8 @@ And use `preprocess` to be compatible with all versions.
- Minecraft 1.19.3 (Ending support soon)
- Minecraft 1.19.4
- Minecraft 1.20.1 (Ending support soon)
- Minecraft 1.20.2
- Minecraft 1.20.2 (Ending support soon)
- Minecraft 1.20.4

### Mappings

Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ preprocess {
def mc1192 = createNode("1.19.2", 1_19_02, "mojang")
def mc1193 = createNode("1.19.3", 1_19_03, "mojang")
def mc1194 = createNode("1.19.4", 1_19_04, "mojang")
def mc1201 = createNode("1.20.1", 1_20_01, "mojang") // root
def mc1201 = createNode("1.20.1", 1_20_01, "mojang")
def mc1202 = createNode("1.20.2", 1_20_02, "mojang")
def mc1204 = createNode("1.20.4", 1_20_04, "mojang")

mc1144.link(mc1152, null)
mc1152.link(mc1165, file("versions/mapping-1.15.2-1.16.5.txt"))
Expand All @@ -26,6 +27,7 @@ preprocess {
mc1193.link(mc1194, null)
mc1194.link(mc1201, null)
mc1201.link(mc1202, null)
mc1202.link(mc1204, null)
}

ext {
Expand Down
12 changes: 4 additions & 8 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ preprocess {

// Module, Property prefix, Resolve condition, Transitive dependencies.
def apiDependencies = [
["curse.maven:itemscroller-242064" , "itemscroller", mcVersion < 12002, false],
["com.github.Nyan-Work:itemscroller", "itemscroller", mcVersion > 12001, false],
["curse.maven:litematica-308892" , "litematica" , mcVersion < 12002, false],
["com.github.Nyan-Work:litematica" , "litematica" , mcVersion > 12001, false],
["curse.maven:minihud-244260" , "minihud" , mcVersion < 12002, false],
["com.github.Nyan-Work:minihud" , "minihud" , mcVersion > 12001, false],
["curse.maven:tweakeroo-297344" , "tweakeroo" , mcVersion < 12002, false],
["com.github.Nyan-Work:tweakeroo" , "tweakeroo" , mcVersion > 12001, false],
["curse.maven:itemscroller-242064" , "itemscroller", true, false],
["curse.maven:litematica-308892" , "litematica" , true, false],
["curse.maven:minihud-244260" , "minihud" , true, false],
["curse.maven:tweakeroo-297344" , "tweakeroo" , true, false],
]

// Module, Property prefix, Resolve condition, Transitive dependencies.
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ mod_version=3.2
mod_license=LGPL-3.0

# Required Libraries
# MagicLib - 0.7.387
magiclib_dependency=0.7.387
magiclib_version=0.7.387
# MagicLib - 0.7.398
magiclib_dependency=0.7.398
magiclib_version=0.7.398

# Annotation processor
lombok_version=1.18.30
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def versions = Arrays.asList(
"1.19.4",
"1.20.1",
"1.20.2",
"1.20.4",
)

for (String version : versions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@Mixin(Minecraft.class)
public abstract class MixinMinecraftClient {
// TODO 去掉该部分
@Inject(method = "clearLevel(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At(value = "HEAD"))
@Inject(method = "disconnect(Lnet/minecraft/client/gui/screens/Screen;)V", at = @At(value = "HEAD"))
private void onDisconnect(CallbackInfo ci) {
if (!Minecraft.getInstance().hasSingleplayerServer()) {
DisconnectEvent.onDisconnect();
Expand Down
8 changes: 4 additions & 4 deletions versions/1.20.2/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ minecraft_version=1.20.2
minecraft_dependency=1.20.2

# Compatible Libraries
itemscroller_version=0.16.2-nyan.6
litematica_version=0.15.3-nyan.6
minihud_version=0.27.0-nyan.6
tweakeroo_version=0.17.1-nyan.6
itemscroller_version=4788435
litematica_version=4789765
minihud_version=4793994
tweakeroo_version=4788437
9 changes: 9 additions & 0 deletions versions/1.20.4/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Development Environment
minecraft_version=1.20.4
minecraft_dependency=1.20.4

# Compatible Libraries
itemscroller_version=4946332
litematica_version=4946471
minihud_version=4946335
tweakeroo_version=4946344
2 changes: 1 addition & 1 deletion versions/mainProject
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.1
1.20.4

0 comments on commit 08c8f70

Please sign in to comment.