From 879ecb819cbb5c0bf7f24f5df129c195a004e8b4 Mon Sep 17 00:00:00 2001 From: 70CentsApple Date: Sun, 14 Jul 2024 13:32:11 +0800 Subject: [PATCH] chore: add MC 1.20.1 as a single subproject --- .github/workflows/release.yml | 7 +++++-- build.gradle | 4 +++- settings.json | 1 + .../features/general/ClickEventsPreviewer.java | 2 +- .../chattools/utils/ChatHistoryNavigatorScreen.java | 10 ++++------ versions/1.20.1/gradle.properties | 9 +++++++++ 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 versions/1.20.1/gradle.properties diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 930894a..b451813 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,9 +72,12 @@ jobs: - game_version: "1.19.4" target_game_versions: "1.19,1.19.1,1.19.2,1.19.3,1.19.4" formatted_version_name: "1.19.x" + - game_version: "1.20.1" + target_game_versions: "1.20,1.20.1" + formatted_version_name: "1.20(.1)" - game_version: "1.20.4" - target_game_versions: "1.20,1.20.1,1.20.2,1.20.3,1.20.4" - formatted_version_name: "1.20(.1,2,3,4)" + target_game_versions: "1.20.2,1.20.3,1.20.4" + formatted_version_name: "1.20.2(3,4)" - game_version: "1.20.6" target_game_versions: "1.20.5,1.20.6" formatted_version_name: "1.20.5(6)" diff --git a/build.gradle b/build.gradle index ee59043..8affa06 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,7 @@ preprocess { def mc117 = createNode('1.17.1', 1_17_01, 'yarn') def mc118 = createNode('1.18.2', 1_18_02, 'yarn') def mc119 = createNode('1.19.4', 1_19_04, 'yarn') + def mc12001 = createNode('1.20.1', 1_20_01, 'yarn') def mc12004 = createNode('1.20.4', 1_20_04, 'yarn') def mc12006 = createNode('1.20.6', 1_20_06, 'yarn') def mc121 = createNode('1.21', 1_21_00, 'yarn') @@ -22,7 +23,8 @@ preprocess { mc116.link(mc117, null) mc117.link(mc118, null) mc118.link(mc119, null) - mc119.link(mc12004, null) + mc119.link(mc12001, null) + mc12001.link(mc12004, null) mc12004.link(mc12006, null) mc12006.link(mc121, null) } diff --git a/settings.json b/settings.json index cf41647..87114f4 100644 --- a/settings.json +++ b/settings.json @@ -4,6 +4,7 @@ "1.17.1", "1.18.2", "1.19.4", + "1.20.1", "1.20.4", "1.20.6", "1.21" diff --git a/src/main/java/net/apple70cents/chattools/features/general/ClickEventsPreviewer.java b/src/main/java/net/apple70cents/chattools/features/general/ClickEventsPreviewer.java index 5cbba7a..bdc8956 100644 --- a/src/main/java/net/apple70cents/chattools/features/general/ClickEventsPreviewer.java +++ b/src/main/java/net/apple70cents/chattools/features/general/ClickEventsPreviewer.java @@ -101,7 +101,7 @@ private static Text getTextToAppend(Style style) { texts.add(TextUtils.trans("texts.PreviewClickEvents.clickEvent")); ClickEvent clickEvent = style.getClickEvent(); Text value = TextUtils.of(clickEvent.getValue()).copy().formatted(Formatting.GREEN); - //#if MC>=12000 + //#if MC>=12002 String action = clickEvent.getAction().asString(); //#else //$$ String action = clickEvent.getAction().getName(); diff --git a/src/main/java/net/apple70cents/chattools/utils/ChatHistoryNavigatorScreen.java b/src/main/java/net/apple70cents/chattools/utils/ChatHistoryNavigatorScreen.java index 80f7edf..fb2f570 100644 --- a/src/main/java/net/apple70cents/chattools/utils/ChatHistoryNavigatorScreen.java +++ b/src/main/java/net/apple70cents/chattools/utils/ChatHistoryNavigatorScreen.java @@ -68,15 +68,13 @@ protected void init() { this.setInitialFocus(this.keywordField); this.chatUnitListWidget = new ChatUnitListWidget(MinecraftClient.getInstance(), this.width - 60, this.height - 120, 65, textRenderer.fontHeight + 3, this.keywordField.getText(), this.chatUnitListWidget); - //#if MC>=12000 + //#if MC>=12002 this.chatUnitListWidget.setX(30); //#else //$$ this.chatUnitListWidget.setLeftPos(30); //#endif //#if MC>=12005 - //#elseif MC>=12000 - //$$ this.chatUnitListWidget.setRenderBackground(false); //#elseif MC>=11700 //$$ this.chatUnitListWidget.setRenderBackground(false); //$$ this.chatUnitListWidget.setRenderHorizontalShadows(false); @@ -309,7 +307,7 @@ public SearchModes getSearchMode() { } public ChatUnitListWidget(MinecraftClient client, int width, int height, int y, int itemHeight, String keyword, @Nullable ChatUnitListWidget copyFrom) { - //#if MC>=12000 + //#if MC>=12002 super(client, width, height, y, itemHeight); //#else //$$ super(client, width, height, y, y + height, itemHeight); @@ -332,7 +330,7 @@ public int getRowWidth() { @Override protected int getScrollbarX() { - //#if MC>=12000 + //#if MC>=12002 int x = this.getX(); //#else //$$ int x = this.left; @@ -356,7 +354,7 @@ public Tooltip getTooltip() { } //#endif - //#if MC>=12000 + //#if MC>=12002 protected void appendClickableNarrations(NarrationMessageBuilder builder) { if (getHoveredEntry() != null) { builder.put(NarrationPart.TITLE, getHoveredEntry().getText()); diff --git a/versions/1.20.1/gradle.properties b/versions/1.20.1/gradle.properties new file mode 100644 index 0000000..a5f3092 --- /dev/null +++ b/versions/1.20.1/gradle.properties @@ -0,0 +1,9 @@ +# Fabric Properties +minecraft_version=1.20.1 +yarn_mappings=1.20.1+build.10 +# Fabric Mod Metadata +minecraft_dependency=1.20.x +# Dependencies +fabric_api_version=0.92.2+1.20.1 +cloth_config_version=11.1.118 +mod_menu_version=7.2.2