Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/Detective/Detective.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ class Detective extends \Aternos\Codex\Detective\Detective
{
protected string $defaultLogClass = MinecraftLog::class;
protected array $possibleLogClasses = [
SpigotCrashReportLog::class,
PaperCrashReportLog::class,
PurpurCrashReportLog::class,
FoliaCrashReport::class,
FabricCrashReportLog::class,
QuiltCrashReportLog::class,
NeoForgeCrashReportLog::class,
ForgeCrashReportLog::class,
VanillaCrashReportLog::class,
MohistCrashReportLog::class,
ArclightCrashReportLog::class,

FabricClientLog::class,
QuiltClientLog::class,
ForgeClientLog::class,
Expand Down Expand Up @@ -83,18 +95,6 @@ class Detective extends \Aternos\Codex\Detective\Detective
GlowstoneServerLog::class,
QuiltServerLog::class,

SpigotCrashReportLog::class,
PaperCrashReportLog::class,
PurpurCrashReportLog::class,
FoliaCrashReport::class,
FabricCrashReportLog::class,
QuiltCrashReportLog::class,
NeoForgeCrashReportLog::class,
ForgeCrashReportLog::class,
VanillaCrashReportLog::class,
MohistCrashReportLog::class,
ArclightCrashReportLog::class,

VanillaNetworkProtocolErrorReportLog::class,

PrismLauncherClientLog::class,
Expand Down
11 changes: 10 additions & 1 deletion src/Log/Minecraft/Vanilla/VanillaCrashReportLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ class VanillaCrashReportLog extends VanillaReportLog implements CrashReportLogTy
use VanillaCrashReportTrait;

/**
* Matches the header only at the start of a line:
* ---- Minecraft Crash Report ----
*
* Crash reports are detected before client logs, so a header inside a log line must not count.
* Forge 1.7.10 prints a system report with this header on every start
* (`[STDOUT/]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----`),
* although the game did not crash.
* A real Forge crash logged with a prefix is still detected by ForgeCrashReportLog.
*
* @inheritDoc
*/
public static function getDetectors(): array
{
return [(new SinglePatternDetector())->setPattern("/---- Minecraft Crash Report ----/")];
return [(new SinglePatternDetector())->setPattern("/^---- Minecraft Crash Report ----/m")];
}
}
Loading
Loading