Skip to content

Commit

Permalink
移除籽岷
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulian233 authored Aug 31, 2024
1 parent 9cedaab commit 6b3faa6
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 45 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
</div>

## 功能

1. 在汉化发布新版本时会在游戏里通知玩家去下载更新。
2. 可配置默认每25分钟在聊天栏发送一条知识。内容包括但不限于汉化组冷知识,汉字易错读音和MC冷知识等。
3. 可配置每次启动时自动下载并启用VM汉化组通用模组汉化资源包。
4. 如果玩家已经下载资源包且发生错误未启用,会在聊天框提示玩家在选项->资源包中手动启用。
5. 如果玩家名是Zi__Min,会在每次进入世界时发送`欢迎来到籽岷的Minecraft游戏世界!`,且称呼改为岷叔。
6. 可配置自动修改游戏语言,当安装[Stenographer](https://modrinth.com/mod/stenographer)模组后将禁用。
7. 可配置是否检测安装i18nupdate或Vault Patch补全汉化模组。如未安装将弹出提示页面引导下载(可按esc退出)
5. 可配置自动修改游戏语言,当安装[Stenographer](https://modrinth.com/mod/stenographer)模组后将禁用。
6. 可配置是否检测安装i18nupdate或Vault Patch补全汉化模组。如未安装将弹出提示页面引导下载(可按esc退出)

## 使用与配置文件

VM汉化组汉化人员请注意:**发布汉化时,请在汉化更新时改一下模组配置里的版本号!**

详见:[https://beta.vmct-cn.top/others/vmtu/config](https://beta.vmct-cn.top/others/vmtu/config)
详见:[https://vmct-cn.top/others/vmtu/config](https://vmct-cn.top/others/vmtu/config)

---

## 支持版本
详见:[https://beta.vmct-cn.top/others/vmtu/support](https://beta.vmct-cn.top/others/vmtu/support)

详见:[https://vmct-cn.top/others/vmtu/support](https://vmct-cn.top/others/vmtu/support)

## 其他
作者:Wulian233(捂脸)、TexTrue。以及Lichiiiiiii修复部分bug!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public class ModConfigs implements ConfigData {
public boolean vaultPatcherCheck = false;

public String switchLanguage = "zh_cn";
public String modPackTranslationUpdateCheckUrl = "https://vmct-cn.top/modpacks/example/update.txt";
public String modPackTranslationUpdateCheckUrl = "https://gitee.com/Wulian233/vmtu/raw/main/update/example.txt";
public String modPackTranslationUrl = "https://vmct-cn.top/modpacks/example/";
public String tipsUrl = "https://vmct-cn.top/tips.txt";
public String tipsUrl = "https://gitee.com/Wulian233/vmtu/raw/main/tips.txt";
public String modPackTranslationVersion = "1.0.0";
public int tipsMinutes = 25;
public String translationPackName = "VM汉化组模组汉化包1.20";
public String translationPackName = "VM汉化组模组汉化包1.21";
public String translationPackUrl= "https://cdn.modrinth.com/data/IDWIdXwS/versions/V5YtW17O/";
public String nameUrl = "https://vmct-cn.top/name.json";
public String nameUrl = "https://gitee.com/Wulian233/vmtu/raw/main/name.json";
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,29 @@ public static void playerJoinEvent(ServerPlayerEntity player) {
String onlineVersion = VersionCheckUtil.getOnlineVersion(player);

if (ModConfigUtil.getConfig().playerNameCheck) {
if (name.equals("Zi__Min")) {
name = "岷叔";
player.sendMessage(Text.translatable("vmtranslationupdate.message.zimin"));
if (ModConfigUtil.getConfig().checkModPackTranslationUpdate && !localVersion.equals(onlineVersion)) {
player.sendMessage(Text.translatable("vmtranslationupdate.message.update", name, localVersion, VersionCheckUtil.getOnlineVersion(player)));
}
} else {
try {
URI uri = URI.create(ModConfigUtil.getConfig().nameUrl);
URLConnection connection = uri.toURL().openConnection();
connection.setConnectTimeout(10000);
BufferedReader reader = new BufferedReader(new InputStreamReader(uri.toURL().openStream(), StandardCharsets.UTF_8));
StringBuilder stringBuilder = new StringBuilder();
String line;
try {
URI uri = URI.create(ModConfigUtil.getConfig().nameUrl);
URLConnection connection = uri.toURL().openConnection();
connection.setConnectTimeout(10000);
BufferedReader reader = new BufferedReader(new InputStreamReader(uri.toURL().openStream(), StandardCharsets.UTF_8));
StringBuilder stringBuilder = new StringBuilder();
String line;

while ((line = reader.readLine()) != null) {
stringBuilder.append(line);
}
reader.close();
while ((line = reader.readLine()) != null) {
stringBuilder.append(line);
}
reader.close();

JsonObject jsonObject = JsonParser.parseString(stringBuilder.toString()).getAsJsonObject();
JsonObject jsonObject = JsonParser.parseString(stringBuilder.toString()).getAsJsonObject();

if (jsonObject.has(name)) {
name = jsonObject.get(name).getAsString();
if (ModConfigUtil.getConfig().checkModPackTranslationUpdate && !localVersion.equals(onlineVersion)) {
player.sendMessage(Text.translatable("vmtranslationupdate.message.update", name, localVersion, VersionCheckUtil.getOnlineVersion(player)));
}
if (jsonObject.has(name)) {
name = jsonObject.get(name).getAsString();
if (ModConfigUtil.getConfig().checkModPackTranslationUpdate && !localVersion.equals(onlineVersion)) {
player.sendMessage(Text.translatable("vmtranslationupdate.message.update", name, localVersion, VersionCheckUtil.getOnlineVersion(player)));
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"vmtranslationupdate.message.update3": " to download the new version.",
"vmtranslationupdate.message.error": "[VM Chinese Group]: Error! There is an issue with the Chinese localization update detection.",
"vmtranslationupdate.message.hover": "Click me to download the new version!",
"vmtranslationupdate.message.zimin": "Welcome to ZiMin's Minecraft world!",
"vmtranslationupdate.message.pack": "VM Chinese Update auto enable localization failed! Please enable \"%s\" pack manually in \"Options -> Resource Packs\".",

"vmtranslationupdate.warn.title": "%s not detected",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"vmtranslationupdate.message.update3": "下载新版本。",
"vmtranslationupdate.message.error": "[VM汉化组]:错误!汉化更新检测出现问题。",
"vmtranslationupdate.message.hover": "点我到官网下载新版本!",
"vmtranslationupdate.message.zimin": "欢迎来到籽岷的Minecraft游戏世界!",
"vmtranslationupdate.message.pack": "VM汉化更新自动启用汉化失败!请在 “选项 -> 资源包” 中手动启用 “%s” 资源包",

"vmtranslationupdate.warn.title": "未检测到 %s 模组",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"vmtranslationupdate.message.update3": "下載新版本。",
"vmtranslationupdate.message.error": "[VM漢化組]:錯誤!漢化更新檢測出現問題。",
"vmtranslationupdate.message.hover": "點我到官網下載新版本!",
"vmtranslationupdate.message.zimin": "歡迎來到籽岷的Minecraft遊戲世界!",
"vmtranslationupdate.message.pack": "VM漢化更新自動啟用漢化失敗!請在 「選項 -> 資源包」 中手動啟用 「%s」 資源包",

"vmtranslationupdate.warn.i18nupdatemod.title": "未檢測到 %s 模組",
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ yarn_mappings=1.21+build.9
yarn_patch=1.21+build.4

archives_base_name=VMTranslationUpdate
mod_version=3.0.1
mod_version=3.0.0
maven_group=top.vmctcn.vmtranslationupdate

clothconfig_version=15.0.127
clothconfig_version=15.0.130

fabric_loader_version=0.16.0
fabric_api_version=0.101.2+1.21
modmenu_version=11.0.1
fabric_loader_version=0.16.3
fabric_api_version=0.102.0+1.21
modmenu_version=11.0.2

neoforge_version=21.0.164
neoforge_version=21.0.167

curseforge_id=890229
modrinth_id=wvCSIW08
2 changes: 1 addition & 1 deletion neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
modLoader = "javafml"
loaderVersion = "[4,)"
loaderVersion = "[21,)"
issueTrackerURL = "https://github.com/VM-Chinese-translate-group/VMTranslationUpdateMod/issues"
license = "MIT"

Expand Down

0 comments on commit 6b3faa6

Please sign in to comment.