Closed QWERTY770 closed 4 days ago
Already aware of it, will solve it as soon as possible, thank you for your feedback.
It seems that you use GBK,But the mod Using UTF8, try switching to UTF8?Maybe this time it will work.
It seems that you use GBK,But the mod Using UTF8, try switching to UTF8?Maybe this time it will work.
I added JVM flag "-Dfile.encoding=UTF-8" but the game crashed again. Why?
Well, later I'll try to build the mod from the source code in order to find out the reason why the game crashed.
After some tests I fixed the bug. See pull request #45 .
Analysis: In the method WriteFile of the class org.cneko.toneko.common.util.FileUtil, the charset is not specified. Thus, the operating system will use its own charset (like GBK) instead of UTF-8. But the YamlConfiguration class only supports UTF-8 encoded files, and this caused the game to crash.
Line 48 should be like this:
FileWriter fw = new FileWriter(f, StandardCharsets.UTF_8);
I installed toNeko 1.0.0-pre-1.21 and ctlib 0.1.10, but the game crashed when I tried to start it.
The other mods I installed are AdvancementInfo 1.20.4-fabric0.91.2-1.4, XPlus Autofish 1.1.1-fabric-1.21, Cloth Config v15 15.0.127, Fabric API 0.100.4+1.21, GeckoLib 4 4.5.6, Lithium 0.12.7, MaLiLib 0.19.999-sakura.6, Mod Menu 11.0.1, Sodium 0.5.11+mc1.21, Tweakeroo 0.20.999-sakura.10, Xaero's Minimap 24.2.1 and Xaero's World Map 1.38.8.
Here is the crash report: (I omitted some information of the system, such as CPU and Windows modules)