mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-12-21 07:00:22 +08:00
Update Fabric warnings pattern in CrashReportAnalyzer (#2742)
This commit is contained in:
parent
ffeabbf1f1
commit
c7f3f2a229
@ -92,7 +92,7 @@ public final class CrashReportAnalyzer {
|
|||||||
DEBUG_CRASH(Pattern.compile("Manually triggered debug crash")),
|
DEBUG_CRASH(Pattern.compile("Manually triggered debug crash")),
|
||||||
CONFIG(Pattern.compile("Failed loading config file (?<file>.*?) of type (.*?) for modid (?<id>.*)"), "id", "file"),
|
CONFIG(Pattern.compile("Failed loading config file (?<file>.*?) of type (.*?) for modid (?<id>.*)"), "id", "file"),
|
||||||
// Fabric gives some warnings
|
// Fabric gives some warnings
|
||||||
FABRIC_WARNINGS(Pattern.compile("(Warnings were found!|Incompatible mod set!)(.*?)[\\n\\r]+(?<reason>[^\\[]+)\\["), "reason"),
|
FABRIC_WARNINGS(Pattern.compile("(Warnings were found!|Incompatible mod set!|Incompatible mods found!)(.*?)[\\n\\r]+(?<reason>[^\\[]+)\\["), "reason"),
|
||||||
// Game crashed when ticking entity
|
// Game crashed when ticking entity
|
||||||
ENTITY(Pattern.compile("Entity Type: (?<type>.*)[\\w\\W\\n\\r]*?Entity's Exact location: (?<location>.*)"), "type", "location"),
|
ENTITY(Pattern.compile("Entity Type: (?<type>.*)[\\w\\W\\n\\r]*?Entity's Exact location: (?<location>.*)"), "type", "location"),
|
||||||
// Game crashed when tesselating block model
|
// Game crashed when tesselating block model
|
||||||
|
@ -370,6 +370,22 @@ public class CrashReportAnalyzerTest {
|
|||||||
result.getMatcher().group("reason").replaceAll("\\s+", ""));
|
result.getMatcher().group("reason").replaceAll("\\s+", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void fabricWarnings2() throws IOException {
|
||||||
|
CrashReportAnalyzer.Result result = findResultByRule(
|
||||||
|
CrashReportAnalyzer.anaylze(loadLog("/logs/fabric_warnings3.txt")),
|
||||||
|
CrashReportAnalyzer.Rule.FABRIC_WARNINGS);
|
||||||
|
assertEquals(("net.fabricmc.loader.impl.FormattedException: Some of your mods are incompatible with the game or each other!\n" +
|
||||||
|
"确定了一种可能的解决方法,这样做可能会解决你的问题:\n" +
|
||||||
|
"\t - 安装 fabric-api,任意版本。\n" +
|
||||||
|
"\t - 安装 sodium,0.5.6 及以上版本。\n" +
|
||||||
|
"更多信息:\n" +
|
||||||
|
"\t - 模组 'Sodium Extra' (sodium-extra) 0.5.4+mc1.20.4-build.116 需要 fabric-api 的 任意版本,但没有安装它!\n" +
|
||||||
|
"\t - 模组 'Sodium Extra' (sodium-extra) 0.5.4+mc1.20.4-build.116 需要 sodium 的 0.5.6 及以上版本,但没有安装它!\n" +
|
||||||
|
"\tat net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:51) ~").replaceAll("\\s+", ""),
|
||||||
|
result.getMatcher().group("reason").replaceAll("\\s+", ""));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void fabricConflicts() throws IOException {
|
public void fabricConflicts() throws IOException {
|
||||||
CrashReportAnalyzer.Result result = findResultByRule(
|
CrashReportAnalyzer.Result result = findResultByRule(
|
||||||
|
18
HMCLCore/src/test/resources/logs/fabric_warnings3.txt
Normal file
18
HMCLCore/src/test/resources/logs/fabric_warnings3.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[01:27:16] [main/INFO]: Loading Minecraft 1.20.4 with Fabric Loader 0.15.6
|
||||||
|
[01:27:16] [main/WARN]: Mod resolution failed
|
||||||
|
[01:27:16] [main/INFO]: Immediate reason: [HARD_DEP_NO_CANDIDATE sodium-extra 0.5.4+mc1.20.4-build.116 {depends fabric-api @ [*]}, ROOT_FORCELOAD_SINGLE sodium-extra 0.5.4+mc1.20.4-build.116]
|
||||||
|
[01:27:16] [main/INFO]: Reason: [HARD_DEP sodium-extra 0.5.4+mc1.20.4-build.116 {depends fabric-api @ [*]}, HARD_DEP sodium-extra 0.5.4+mc1.20.4-build.116 {depends sodium @ [>=0.5.6]}]
|
||||||
|
[01:27:16] [main/INFO]: Fix: add [add:fabric-api 1 ([(-∞,∞)]), add:sodium 0.5.6 ([[0.5.6,∞)])], remove [], replace []
|
||||||
|
[01:27:17] [main/ERROR]: Incompatible mods found!
|
||||||
|
net.fabricmc.loader.impl.FormattedException: Some of your mods are incompatible with the game or each other!
|
||||||
|
确定了一种可能的解决方法,这样做可能会解决你的问题:
|
||||||
|
- 安装 fabric-api,任意版本。
|
||||||
|
- 安装 sodium,0.5.6 及以上版本。
|
||||||
|
更多信息:
|
||||||
|
- 模组 'Sodium Extra' (sodium-extra) 0.5.4+mc1.20.4-build.116 需要 fabric-api 的 任意版本,但没有安装它!
|
||||||
|
- 模组 'Sodium Extra' (sodium-extra) 0.5.4+mc1.20.4-build.116 需要 sodium 的 0.5.6 及以上版本,但没有安装它!
|
||||||
|
at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:51) ~[fabric-loader-0.15.6.jar:?]
|
||||||
|
at net.fabricmc.loader.impl.FabricLoaderImpl.load(FabricLoaderImpl.java:195) ~[fabric-loader-0.15.6.jar:?]
|
||||||
|
at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:146) ~[fabric-loader-0.15.6.jar:?]
|
||||||
|
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68) ~[fabric-loader-0.15.6.jar:?]
|
||||||
|
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.6.jar:?]
|
Loading…
Reference in New Issue
Block a user