Skip to content

Commit

Permalink
better crash report software detection
Browse files Browse the repository at this point in the history
  • Loading branch information
matthi4s committed Jun 18, 2024
1 parent 48b0432 commit 61517e0
Show file tree
Hide file tree
Showing 7 changed files with 1,971 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Log/Minecraft/Vanilla/Fabric/FabricCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static function getDetectors(): array
return [
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: fabric/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'fabric'/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Server brand changed to 'fabric'/im"),
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ class ArclightCrashReportLog extends ArclightLog implements CrashReportLogTypeIn
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tKnown server brands:( [a-zA-Z])* arclight/m")];
return [
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tKnown server brands:( [a-zA-Z])* arclight/m"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Server brand changed to 'arclight'/im")
];
}
}
7 changes: 6 additions & 1 deletion src/Log/Minecraft/Vanilla/Forge/ForgeCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ class ForgeCrashReportLog extends ForgeLog implements CrashReportLogTypeInterfac
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tFML:/m")];
return [
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tFML:/m"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to '(?:fml,)?forge'/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Server brand changed to '(?:fml,)?forge'/im"),

];
}


Expand Down
1 change: 1 addition & 0 deletions src/Log/Minecraft/Vanilla/Quilt/QuiltCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static function getDetectors(): array
return [
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\t(?:Known )?server brands?: quilt/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Client brand changed to 'quilt'/im"),
(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----(\n.*)*\n\tIs Modded: Definitely; Server brand changed to 'quilt'/im")
];
}

Expand Down
Loading

0 comments on commit 61517e0

Please sign in to comment.