Skip to content

Commit

Permalink
Merge pull request #94 from aternosorg/neoforge-crash-report-version
Browse files Browse the repository at this point in the history
Detect more crash reports from NeoForge + detect version in crash reports from NeoForge
  • Loading branch information
pavog authored Nov 6, 2024
2 parents 7b614b3 + 28d0e38 commit f85d637
Show file tree
Hide file tree
Showing 7 changed files with 942 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ public function __construct()
public static function getPatterns(): array
{
return [
'/NeoForge mod loading, version ('. static::$versionPattern .'),/',
'/--fml\.neoForgeVersion, ('. static::$versionPattern .')/',
'/\tNeoForge: net.neoforged:('. static::$versionPattern .')/',
'/NeoForge mod loading, version (' . static::$versionPattern . '),/',
'/--fml\.neoForgeVersion, (' . static::$versionPattern . ')/',
'/\tNeoForge: net.neoforged:(' . static::$versionPattern . ')/',
'/^\t\t\S*\s*\|\S*\s*\|neoforge\s*\|(' . static::$versionPattern . ')\s*\|/'
];
}

Expand Down
3 changes: 3 additions & 0 deletions src/Log/Minecraft/Vanilla/NeoForge/NeoForgeCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public static function getDetectors(): array
(new MultiPatternDetector())
->addPattern("/^---- Minecraft Crash Report ----$/m")
->addPattern("/^\tNeoForge: net\.neoforged:/m"),
(new MultiPatternDetector())
->addPattern("/^---- Minecraft Crash Report ----$/m")
->addPattern("/^\t\t[^|]*\|[^|]*\|\s*neoforge\s*\|/m"),
];
}

Expand Down
8 changes: 4 additions & 4 deletions test/data/Vanilla/NeoForge/neoforge-1-20-4-client-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -2124,15 +2124,15 @@
},
{
"message": "NeoForge version: 20.4.155-beta",
"counter": 1,
"counter": 2,
"entry": {
"level": 6,
"time": null,
"prefix": "\tNeoForge:",
"prefix": null,
"lines": [
{
"number": 189,
"content": "\tNeoForge: net.neoforged:20.4.155-beta"
"number": 186,
"content": "\t\tneoforge-20.4.155-beta-universal.jar |NeoForge |neoforge |20.4.155-beta |DONE |Manifest: NOSIGNATURE"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions test/data/Vanilla/NeoForge/neoforge-1-20-4-server-report.json
Original file line number Diff line number Diff line change
Expand Up @@ -1354,15 +1354,15 @@
},
{
"message": "NeoForge version: 20.4.155-beta",
"counter": 1,
"counter": 2,
"entry": {
"level": 6,
"time": null,
"prefix": "\tNeoForge:",
"prefix": null,
"lines": [
{
"number": 119,
"content": "\tNeoForge: net.neoforged:20.4.155-beta"
"number": 116,
"content": "\t\tneoforge-20.4.155-beta-universal.jar |NeoForge |neoforge |20.4.155-beta |DONE |Manifest: NOSIGNATURE"
}
]
},
Expand Down
Loading

0 comments on commit f85d637

Please sign in to comment.