Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/Analyser/MohistAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ public function __construct()
{
parent::__construct();
$this->addPossibleInsightClass(MohistVersionInformation::class);
$this->overridePossibleInsightClass(ForgeVersionInformation::class ,MohistForgeVersionInformation::class);
$this->overridePossibleInsightClass(ForgeVersionInformation::class, MohistForgeVersionInformation::class);
}
}
2 changes: 1 addition & 1 deletion src/Analyser/VanillaAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\AquaticWorldOnOlderVersionProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\AuthServerProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\MalformedEncodingProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\OldPlayerDirectoryProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\OverworldSettingsMissingProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\TickingBlockEntityProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\AuthServerProblem;

/**
* Class VanillaAnalyser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public function __construct()
*/
public static function getPatterns(): array
{
return [ '/^' . CustomSkinLoaderLog::getPrefixPattern() . 'Java Version: ([0-9\.]+(?:_\d+)?)/'];
return ['/^' . CustomSkinLoaderLog::getPrefixPattern() . 'Java Version: ([0-9\.]+(?:_\d+)?)/'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public function __construct()
*/
public static function getPatterns(): array
{
return [ '/^' . CustomSkinLoaderLog::getPrefixPattern() . 'Minecraft: (' . VanillaVersionInformation::getVersionPattern() . ')$/'];
return ['/^' . CustomSkinLoaderLog::getPrefixPattern() . 'Minecraft: (' . VanillaVersionInformation::getVersionPattern() . ')$/'];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct()
*/
public static function getPatterns(): array
{
return [ '/^' . CustomSkinLoaderLog::getPrefixPattern() . 'CustomSkinLoader ('. static::$versionPattern .')$/'];
return ['/^' . CustomSkinLoaderLog::getPrefixPattern() . 'CustomSkinLoader (' . static::$versionPattern . ')$/'];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class FabricVersionInformation extends \Aternos\Codex\Minecraft\Analysis\Informa
public static function getPatterns(): array
{
return [
'/\t\tfabricloader: Fabric Loader ('. static::$fabricVersionPattern .')/'
'/\t\tfabricloader: Fabric Loader (' . static::$fabricVersionPattern . ')/'
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function __construct()
public static function getPatterns(): array
{
return [
'/'. FabricLog::getPrefixPattern() .'[\[(]FabricLoader[\])] Loading [0-9]+ mods:[\s\n](?:\s*[^,]+, ?)*(?:\s+- )?java[ @](\d+)/',
'/'. FabricLog::getPrefixPattern() .'(?:[\[(]FabricLoader[\])] )?Loading [0-9]+ mods:[\s\n](?:\s*- .+\n ?)*(?:\s+- )?java[ @](\d+)/'
'/' . FabricLog::getPrefixPattern() . '[\[(]FabricLoader[\])] Loading [0-9]+ mods:[\s\n](?:\s*[^,]+, ?)*(?:\s+- )?java[ @](\d+)/',
'/' . FabricLog::getPrefixPattern() . '(?:[\[(]FabricLoader[\])] )?Loading [0-9]+ mods:[\s\n](?:\s*- .+\n ?)*(?:\s+- )?java[ @](\d+)/'
];
}

Expand Down
4 changes: 2 additions & 2 deletions src/Analysis/Information/Fabric/FabricVersionInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public function __construct()
public static function getPatterns(): array
{
return [
'/'. VanillaServerLog::getPrefixPattern() .'[\[(]FabricLoader[\])] Loading [0-9]+ mods: (?:\w{1,63}@[^, ]+, )*fabricloader@('. static::$fabricVersionPattern .')/',
'/'. VanillaServerLog::getPrefixPattern() .'(?:\(FabricLoader\/GameProvider\) )?Loading Minecraft '. VanillaVersionInformation::getVersionPattern() .' with Fabric Loader ('. static::$fabricVersionPattern .')/'
'/' . VanillaServerLog::getPrefixPattern() . '[\[(]FabricLoader[\])] Loading [0-9]+ mods: (?:\w{1,63}@[^, ]+, )*fabricloader@(' . static::$fabricVersionPattern . ')/',
'/' . VanillaServerLog::getPrefixPattern() . '(?:\(FabricLoader\/GameProvider\) )?Loading Minecraft ' . VanillaVersionInformation::getVersionPattern() . ' with Fabric Loader (' . static::$fabricVersionPattern . ')/'
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class ForgeVersionInformation extends \Aternos\Codex\Minecraft\Analysis\Informat
public static function getPatterns(): array
{
return [
'/FML: MCP (?:'. static::$versionPattern .') Powered by Forge ('. static::$versionPattern .')/',
'/Forge: net.minecraftforge:('. static::$versionPattern .')/',
'/FML: MCP (?:' . static::$versionPattern . ') Powered by Forge (' . static::$versionPattern . ')/',
'/Forge: net.minecraftforge:(' . static::$versionPattern . ')/',
];
}
}
4 changes: 2 additions & 2 deletions src/Analysis/Information/Forge/ForgeVersionInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function __construct()
public static function getPatterns(): array
{
return [
'/MinecraftForge v('. static::$versionPattern .') Initialized/',
'/--fml\.forgeVersion, ('. static::$versionPattern .')/'
'/MinecraftForge v(' . static::$versionPattern . ') Initialized/',
'/--fml\.forgeVersion, (' . static::$versionPattern . ')/'
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class NeoForgeVanillaVersionInformation extends VanillaVersionInformation
public static function getPatterns(): array
{
return array_merge(parent::getPatterns(), [
'/NeoForge mod loading, version '. NeoForgeVersionInformation::getVersionPattern() .', for MC ('. static::$vanillaVersionPattern . ')/',
"/--fml\.mcVersion, (". static::$vanillaVersionPattern .")/"
'/NeoForge mod loading, version ' . NeoForgeVersionInformation::getVersionPattern() . ', for MC (' . static::$vanillaVersionPattern . ')/',
"/--fml\.mcVersion, (" . static::$vanillaVersionPattern . ")/"
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct()
*/
public static function getPatterns(): array
{
return ['/'. VanillaServerLog::getPrefixPattern() .'Loading [0-9]+ mods:[\s\n](?:\s*- .+\n ?)*(?:\s+- )?java[ @](\d+)/'];
return ['/' . VanillaServerLog::getPrefixPattern() . 'Loading [0-9]+ mods:[\s\n](?:\s*- .+\n ?)*(?:\s+- )?java[ @](\d+)/'];
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Information/Quilt/QuiltVersionInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct()
public static function getPatterns(): array
{
return [
'/'. VanillaServerLog::getPrefixPattern() .'Loading Minecraft '. VanillaVersionInformation::getVersionPattern() .' with Quilt Loader ('. static::$quiltVersionInformation .')/'
'/' . VanillaServerLog::getPrefixPattern() . 'Loading Minecraft ' . VanillaVersionInformation::getVersionPattern() . ' with Quilt Loader (' . static::$quiltVersionInformation . ')/'
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Problem/Fabric/FabricDuplicateModProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getMessage(): string
public static function getPatterns(): array
{
return [
"/". VanillaServerLog::getPrefixPattern() . "A critical error occurred\nnet\.fabricmc\.loader\.discovery\.ModResolutionException: Duplicate versions for mod ID '([^']+)': \[[^ ]+ at ([^\]]+)\]/"
"/" . VanillaServerLog::getPrefixPattern() . "A critical error occurred\nnet\.fabricmc\.loader\.discovery\.ModResolutionException: Duplicate versions for mod ID '([^']+)': \[[^ ]+ at ([^\]]+)\]/"
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Problem/Fabric/FabricEntryStageProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getMessage(): string
public static function getPatterns(): array
{
return [
"/java.lang.RuntimeException: Could not execute entrypoint stage '[^']+' due to errors, provided by '(".static::$modIDPattern.")'!/"
"/java.lang.RuntimeException: Could not execute entrypoint stage '[^']+' due to errors, provided by '(" . static::$modIDPattern . ")'!/"
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function setSecondModName(string $modName): static
public static function getPatterns(): array
{
return [
"/\s*- Mod ". static::$modNamePattern ." [^\\n]+ (?:is incompatible|conflicts) with [^\\n]+ of (?:mod )?". static::$modNamePattern .",/"
"/\s*- Mod " . static::$modNamePattern . " [^\\n]+ (?:is incompatible|conflicts) with [^\\n]+ of (?:mod )?" . static::$modNamePattern . ",/"
];
}

Expand Down
14 changes: 7 additions & 7 deletions src/Analysis/Problem/Fabric/FabricModDependencyProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ public function getMessage(): string
public static function getPatterns(): array
{
return [
'short-error' => '/net\.fabricmc\.loader\.discovery\.ModResolutionException: Could not find required mod: '. static::$modNamePattern .' requires {'. static::$modNamePattern .' @ \[([^\]]+)\]}/',
'any' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires any version of (?:mod )?". static::$modNamePattern .",/",
'minimum' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires version ([^ ]+) or later of (?:mod )?". static::$modNamePattern .",/",
'any-after' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires any version after ([^ ]+) of (?:mod )?". static::$modNamePattern .",/",
'any-before' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires any version before ([^ ]+) of (?:mod )?". static::$modNamePattern .",/",
'specific' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires version ([^ ]+) of (?:mod )?". static::$modNamePattern .",/",
'between' => "/\s*- Mod ". static::$modNamePattern ."(?: [^ ]+)? requires any version between ([^ ]+) \((inclusive|exclusive)\) and ([^ ]+) \((inclusive|exclusive)\) of (?:mod )?". static::$modNamePattern .",/"
'short-error' => '/net\.fabricmc\.loader\.discovery\.ModResolutionException: Could not find required mod: ' . static::$modNamePattern . ' requires {' . static::$modNamePattern . ' @ \[([^\]]+)\]}/',
'any' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires any version of (?:mod )?" . static::$modNamePattern . ",/",
'minimum' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires version ([^ ]+) or later of (?:mod )?" . static::$modNamePattern . ",/",
'any-after' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires any version after ([^ ]+) of (?:mod )?" . static::$modNamePattern . ",/",
'any-before' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires any version before ([^ ]+) of (?:mod )?" . static::$modNamePattern . ",/",
'specific' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires version ([^ ]+) of (?:mod )?" . static::$modNamePattern . ",/",
'between' => "/\s*- Mod " . static::$modNamePattern . "(?: [^ ]+)? requires any version between ([^ ]+) \((inclusive|exclusive)\) and ([^ ]+) \((inclusive|exclusive)\) of (?:mod )?" . static::$modNamePattern . ",/"
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Analysis/Problem/Vanilla/AuthServerProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Aternos\Codex\Minecraft\Analysis\Problem\Vanilla;

use Aternos\Codex\Minecraft\Translator\Translator;
use Aternos\Codex\Minecraft\Analysis\Solution\Vanilla\AuthServerSolution;
use Aternos\Codex\Minecraft\Translator\Translator;

/**
* Class AuthServerProblem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ServerInstallDifferentVersionSolution extends BukkitSolution

/**
* Returns the suggested server software version that should be installed.
*
*
* @return string
*/
public function getSoftwareVersion(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CustomSkinLoaderClientLog extends CustomSkinLoaderLog implements ClientLog
public static function getDetectors(): array
{
return [(new SinglePatternDetector())
->setPattern("/^". static::$prefixPattern . "CustomSkinLoader "
->setPattern("/^" . static::$prefixPattern . "CustomSkinLoader "
. CustomSkinLoaderVersionInformation::getVersionPattern() . "$/m")];
}
}
2 changes: 1 addition & 1 deletion src/Log/Minecraft/Vanilla/Fabric/FabricLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ abstract class FabricLog extends VanillaLog
public static function getDetectors(): array
{
return array_merge(parent::getDetectors(), [
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . '(?:\(FabricLoader\/GameProvider\) )?Loading Minecraft '. VanillaVersionInformation::getVersionPattern() . ' with Fabric Loader/m'),
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . '(?:\(FabricLoader\/GameProvider\) )?Loading Minecraft ' . VanillaVersionInformation::getVersionPattern() . ' with Fabric Loader/m'),
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . '[[(]FabricLoader[\])] Loading \d+ mods:/m'),
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . 'A critical error occurred\nnet.fabricmc.loader/m'),
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . 'Found new data pack Fabric Mods, loading it automatically$/m'),
Expand Down
2 changes: 1 addition & 1 deletion src/Log/Minecraft/Vanilla/Quilt/QuiltLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class QuiltLog extends VanillaLog
public static function getDetectors(): array
{
return array_merge(parent::getDetectors(), [
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . 'Loading Minecraft '. VanillaVersionInformation::getVersionPattern() . ' with Quilt Loader/m')
(new SinglePatternDetector())->setPattern('/^' . static::$prefixPattern . 'Loading Minecraft ' . VanillaVersionInformation::getVersionPattern() . ' with Quilt Loader/m')
]);
}

Expand Down