Skip to content

Commit

Permalink
Modify regex to match if wrong mod/forge version is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjpeg committed Dec 19, 2024
1 parent 07fbade commit 5e29300
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Analysis/Problem/Forge/ModDependencyProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public static function getPatterns(): array
{
return [
'/The mod \S+ \(([^\)]+)\) requires mods \[([^\]]+)\] to be available/',
'/net\.minecraftforge\.fml\.common\.MissingModsException: Mod \S+ \((.+)\) requires (.+)/',
'/net\.minecraftforge\.fml\.ModLoadingException: Mod \§.([^\§]+)\§. requires \§.([^\§]+)\§. \§.([^ \§]+)[^\§]*\§./',
'/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*\n)*Mod \§.([^\§]+)§. requires \§.([^\§]+)\§. \§.([^ \§]+)[^\§]*\§./'
'/net\.minecraftforge\.fml\.common\.MissingModsException: Mod \S+ \((.+)\) requires (?!minecraft[,\s])(.+)/',
'/net\.minecraftforge\.fml\.ModLoadingException: Mod \§.([^\§]+)\§. requires \§.(?!minecraft\§.)([^\§]+)\§. \§.([^ \§]+)[^\§]*\§./',
'/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*\n)*Mod \§.([^\§]+)§. requires \§.(?!minecraft\§.)([^\§]+)\§. \§.([^ \§]+)[^\§]*\§./'
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public function getMessage(): string
*/
public static function getPatterns(): array
{
return ['/The mod (\S+) does not wish to run in Minecraft version Minecraft ([0-9\.]+)\. You will have to remove it to play\./'];
return [
'/The mod (\S+) does not wish to run in Minecraft version Minecraft ([0-9\.]+)\. You will have to remove it to play\./',
'/net\.minecraftforge\.fml\.ModLoadingException: Mod \§.([^\§]+)\§. requires \§.minecraft\§. \§.([^ \§]+)[^\§]*\§./',
];
}

/**
Expand Down

0 comments on commit 5e29300

Please sign in to comment.