Skip to content

Commit ee1dade

Browse files
committed
feat: update dependencies
1 parent 676309c commit ee1dade

5 files changed

Lines changed: 31 additions & 24 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@
2828
## 支持的「简体中文资源包」
2929
为了尽可能实用,目前本Mod会根据游戏版本自动下载或转换「简体中文资源包」。
3030
- 官方支持:支持1.10.2、1.12.2、1.16.5、1.18.2、1.19.3
31-
- 自动转换:支持其它所有版本,会合并最近的双版本,尽可能做最大化的支持;即便是官方支持版本,也会合并一些其它版本的资源包
31+
- 自动转换:支持其它所有版本,会合并最近的双版本,尽可能做最大化的支持;即便是官方支持版本,也会合并一些其它版本的资源包
32+
- 特别说明:1.13开始将语言文件变化为json格式,所以不能将1.12.2的资源包用于1.13以上,反之同理

build.gradle.kts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
id("com.github.johnrengelman.shadow") version ("7.1.2")
32
id("java")
4-
id("com.modrinth.minotaur") version "2.6.0"
5-
id("io.github.CDAGaming.cursegradle") version "1.6.0"
3+
id("com.github.johnrengelman.shadow") version "8.1.1"
4+
id("com.modrinth.minotaur") version "2.8.4"
5+
id("io.github.CDAGaming.cursegradle") version "1.6.1"
66
}
77

88
group = "i18nupdatemod"
@@ -43,17 +43,17 @@ configurations.configureEach {
4343
}
4444

4545
dependencies {
46-
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
47-
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
46+
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
47+
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
4848
implementation("net.runelite.archive-patcher:archive-patcher-applier:1.2")
49-
compileOnly("org.jetbrains:annotations:24.0.0")
49+
compileOnly("org.jetbrains:annotations:24.0.1")
5050

51-
implementation("net.fabricmc:fabric-loader:0.14.12")
51+
implementation("net.fabricmc:fabric-loader:0.14.22")
5252
implementation("cpw.mods:modlauncher:8.1.3")
5353
implementation("net.minecraft:launchwrapper:1.12")
5454

55-
implementation("commons-io:commons-io:2.11.0")
56-
implementation("org.ow2.asm:asm:9.4")
55+
implementation("commons-io:commons-io:2.14.0")
56+
implementation("org.ow2.asm:asm:9.6")
5757
implementation("com.google.code.gson:gson:2.10.1")
5858

5959
}

src/main/java/i18nupdatemod/core/ResourcePack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void downloadFull(String fileUrl, String md5Url) throws IOException {
8484
Files.move(downloadTmp, tmpFilePath, StandardCopyOption.REPLACE_EXISTING);
8585
Log.debug(String.format("Updates temp file: %s", tmpFilePath));
8686
} catch (Exception e) {
87-
Log.warning("Error which downloading: ", e);
87+
Log.warning("Error while downloading: %s", e);
8888
}
8989
if (!Files.exists(tmpFilePath)) {
9090
throw new FileNotFoundException("Tmp file not found.");

src/main/java/i18nupdatemod/util/DigestUtil.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ public static String md5Hex(Path file) throws IOException, NoSuchAlgorithmExcept
1818
dig.update(buf, 0, read);
1919
}
2020

21-
byte[] data = dig.digest();
22-
StringBuilder sb = new StringBuilder();
23-
for (byte d : data) {
24-
sb.append(Integer.toHexString(d));
25-
}
26-
return sb.toString();
21+
return hexString(dig.digest());
22+
}
23+
}
24+
25+
private static final String HEX = "0123456789ABCDEF";
26+
27+
public static String hexString(byte[] data) {
28+
StringBuilder sb = new StringBuilder();
29+
for (byte d : data) {
30+
sb.append(HEX.charAt((d & 0xf0) >>> 4));
31+
sb.append(HEX.charAt(d & 0xf));
2732
}
33+
return sb.toString();
2834
}
2935
}

src/main/resources/i18nMetaData.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,44 +103,44 @@
103103
],
104104
"assets": [
105105
{
106-
"loader": "Forge",
107106
"targetVersion": "1.10.2",
107+
"loader": "Forge",
108108
"filename": "Minecraft-Mod-Language-Modpack-1-10-2.zip",
109109
"md5Filename": "1.10.2.md5"
110110
},
111111
{
112-
"loader": "Forge",
113112
"targetVersion": "1.12.2",
113+
"loader": "Forge",
114114
"filename": "Minecraft-Mod-Language-Modpack.zip",
115115
"md5Filename": "1.12.2.md5"
116116
},
117117
{
118-
"loader": "Forge",
119118
"targetVersion": "1.16.5",
119+
"loader": "Forge",
120120
"filename": "Minecraft-Mod-Language-Modpack-1-16.zip",
121121
"md5Filename": "1.16.md5"
122122
},
123123
{
124-
"loader": "Fabric",
125124
"targetVersion": "1.16.5",
125+
"loader": "Fabric",
126126
"filename": "Minecraft-Mod-Language-Modpack-1-16-Fabric.zip",
127127
"md5Filename": "1.16-fabric.md5"
128128
},
129129
{
130-
"loader": "Forge",
131130
"targetVersion": "1.18.2",
131+
"loader": "Forge",
132132
"filename": "Minecraft-Mod-Language-Modpack-1-18.zip",
133133
"md5Filename": "1.18.md5"
134134
},
135135
{
136-
"loader": "Fabric",
137136
"targetVersion": "1.18.2",
137+
"loader": "Fabric",
138138
"filename": "Minecraft-Mod-Language-Modpack-1-18-Fabric.zip",
139139
"md5Filename": "1.18-fabric.md5"
140140
},
141141
{
142-
"loader": "Forge",
143142
"targetVersion": "1.19.3",
143+
"loader": "Forge",
144144
"filename": "Minecraft-Mod-Language-Modpack-1-19.zip",
145145
"md5Filename": "1.19.md5"
146146
}

0 commit comments

Comments
 (0)