From 08c8f7099c59e4775139a60882de976be6d62815 Mon Sep 17 00:00:00 2001 From: Hendrix-Shen Date: Sat, 16 Dec 2023 23:38:09 +0800 Subject: [PATCH] Support Minecraft 1.20.4 Signed-off-by: Hendrix-Shen --- .github/workflows/publish.yml | 1 + README.md | 3 ++- README_EN.md | 3 ++- build.gradle | 4 +++- common.gradle | 12 ++++-------- gradle.properties | 6 +++--- settings.gradle | 1 + .../mixin/event/disconnect/MixinMinecraftClient.java | 2 +- versions/1.20.2/gradle.properties | 8 ++++---- versions/1.20.4/gradle.properties | 9 +++++++++ versions/mainProject | 2 +- 11 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 versions/1.20.4/gradle.properties diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b1755b10..3d245b74 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -68,6 +68,7 @@ jobs: 1.19.4 1.20.1 1.20.2 + 1.20.4 version-resolver: any diff --git a/README.md b/README.md index 295ace01..9a2ae5b6 100644 --- a/README.md +++ b/README.md @@ -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 ### 混淆映射表 diff --git a/README_EN.md b/README_EN.md index 1c7be6c0..fdf53418 100644 --- a/README_EN.md +++ b/README_EN.md @@ -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 diff --git a/build.gradle b/build.gradle index b1a5b238..56b9031a 100644 --- a/build.gradle +++ b/build.gradle @@ -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")) @@ -26,6 +27,7 @@ preprocess { mc1193.link(mc1194, null) mc1194.link(mc1201, null) mc1201.link(mc1202, null) + mc1202.link(mc1204, null) } ext { diff --git a/common.gradle b/common.gradle index 0d6e63e3..27c5e553 100644 --- a/common.gradle +++ b/common.gradle @@ -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. diff --git a/gradle.properties b/gradle.properties index d304150f..45eee661 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 5d20f3fc..35f39d6a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -37,6 +37,7 @@ def versions = Arrays.asList( "1.19.4", "1.20.1", "1.20.2", + "1.20.4", ) for (String version : versions) { diff --git a/src/main/java/com/plusls/MasaGadget/mixin/event/disconnect/MixinMinecraftClient.java b/src/main/java/com/plusls/MasaGadget/mixin/event/disconnect/MixinMinecraftClient.java index a058f061..069d963b 100644 --- a/src/main/java/com/plusls/MasaGadget/mixin/event/disconnect/MixinMinecraftClient.java +++ b/src/main/java/com/plusls/MasaGadget/mixin/event/disconnect/MixinMinecraftClient.java @@ -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(); diff --git a/versions/1.20.2/gradle.properties b/versions/1.20.2/gradle.properties index 3160cbdc..d32a0dde 100644 --- a/versions/1.20.2/gradle.properties +++ b/versions/1.20.2/gradle.properties @@ -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 diff --git a/versions/1.20.4/gradle.properties b/versions/1.20.4/gradle.properties new file mode 100644 index 00000000..5b6381ad --- /dev/null +++ b/versions/1.20.4/gradle.properties @@ -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 diff --git a/versions/mainProject b/versions/mainProject index 1acb46a4..1b9335f1 100644 --- a/versions/mainProject +++ b/versions/mainProject @@ -1 +1 @@ -1.20.1 \ No newline at end of file +1.20.4 \ No newline at end of file