Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xfl03 committed Oct 10, 2023
1 parent 676309c commit ee1dade
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@
## 支持的「简体中文资源包」
为了尽可能实用,目前本Mod会根据游戏版本自动下载或转换「简体中文资源包」。
- 官方支持:支持1.10.2、1.12.2、1.16.5、1.18.2、1.19.3
- 自动转换:支持其它所有版本,会合并最近的双版本,尽可能做最大化的支持;即便是官方支持版本,也会合并一些其它版本的资源包
- 自动转换:支持其它所有版本,会合并最近的双版本,尽可能做最大化的支持;即便是官方支持版本,也会合并一些其它版本的资源包
- 特别说明:1.13开始将语言文件变化为json格式,所以不能将1.12.2的资源包用于1.13以上,反之同理
18 changes: 9 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("com.github.johnrengelman.shadow") version ("7.1.2")
id("java")
id("com.modrinth.minotaur") version "2.6.0"
id("io.github.CDAGaming.cursegradle") version "1.6.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.modrinth.minotaur") version "2.8.4"
id("io.github.CDAGaming.cursegradle") version "1.6.1"
}

group = "i18nupdatemod"
Expand Down Expand Up @@ -43,17 +43,17 @@ configurations.configureEach {
}

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

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

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

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/i18nupdatemod/core/ResourcePack.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void downloadFull(String fileUrl, String md5Url) throws IOException {
Files.move(downloadTmp, tmpFilePath, StandardCopyOption.REPLACE_EXISTING);
Log.debug(String.format("Updates temp file: %s", tmpFilePath));
} catch (Exception e) {
Log.warning("Error which downloading: ", e);
Log.warning("Error while downloading: %s", e);
}
if (!Files.exists(tmpFilePath)) {
throw new FileNotFoundException("Tmp file not found.");
Expand Down
18 changes: 12 additions & 6 deletions src/main/java/i18nupdatemod/util/DigestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ public static String md5Hex(Path file) throws IOException, NoSuchAlgorithmExcept
dig.update(buf, 0, read);
}

byte[] data = dig.digest();
StringBuilder sb = new StringBuilder();
for (byte d : data) {
sb.append(Integer.toHexString(d));
}
return sb.toString();
return hexString(dig.digest());
}
}

private static final String HEX = "0123456789ABCDEF";

public static String hexString(byte[] data) {
StringBuilder sb = new StringBuilder();
for (byte d : data) {
sb.append(HEX.charAt((d & 0xf0) >>> 4));
sb.append(HEX.charAt(d & 0xf));
}
return sb.toString();
}
}
14 changes: 7 additions & 7 deletions src/main/resources/i18nMetaData.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,44 +103,44 @@
],
"assets": [
{
"loader": "Forge",
"targetVersion": "1.10.2",
"loader": "Forge",
"filename": "Minecraft-Mod-Language-Modpack-1-10-2.zip",
"md5Filename": "1.10.2.md5"
},
{
"loader": "Forge",
"targetVersion": "1.12.2",
"loader": "Forge",
"filename": "Minecraft-Mod-Language-Modpack.zip",
"md5Filename": "1.12.2.md5"
},
{
"loader": "Forge",
"targetVersion": "1.16.5",
"loader": "Forge",
"filename": "Minecraft-Mod-Language-Modpack-1-16.zip",
"md5Filename": "1.16.md5"
},
{
"loader": "Fabric",
"targetVersion": "1.16.5",
"loader": "Fabric",
"filename": "Minecraft-Mod-Language-Modpack-1-16-Fabric.zip",
"md5Filename": "1.16-fabric.md5"
},
{
"loader": "Forge",
"targetVersion": "1.18.2",
"loader": "Forge",
"filename": "Minecraft-Mod-Language-Modpack-1-18.zip",
"md5Filename": "1.18.md5"
},
{
"loader": "Fabric",
"targetVersion": "1.18.2",
"loader": "Fabric",
"filename": "Minecraft-Mod-Language-Modpack-1-18-Fabric.zip",
"md5Filename": "1.18-fabric.md5"
},
{
"loader": "Forge",
"targetVersion": "1.19.3",
"loader": "Forge",
"filename": "Minecraft-Mod-Language-Modpack-1-19.zip",
"md5Filename": "1.19.md5"
}
Expand Down

0 comments on commit ee1dade

Please sign in to comment.