-
Notifications
You must be signed in to change notification settings - Fork 6
Add problem for missing data pack and overworld settings missing #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
964e9e3
Add problem for missing data pack and overworld settings missing
GreisMicha 87ffea3
fix lang-vars, move log file to correct path
GreisMicha 40d0a45
adjust naming scheme of log files
GreisMicha dd2ab5e
make regex more precise
GreisMicha 8da0f22
return seperator in Analyser, more precise solution, add correct log
GreisMicha 41fa293
fix display of the correct mod
GreisMicha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?php | ||
|
|
||
|
|
||
| namespace Aternos\Codex\Minecraft\Analysis\Problem\Forge; | ||
|
|
||
| use Aternos\Codex\Minecraft\Analysis\Solution\DoNothingSolution; | ||
| use Aternos\Codex\Minecraft\Analysis\Solution\Forge\ModInstallSolution; | ||
| use Aternos\Codex\Minecraft\Translator\Translator; | ||
|
|
||
| class MissingDatapackModProblem extends ModProblem | ||
| { | ||
| /** | ||
| * Get a human-readable message | ||
| * | ||
| * @return string | ||
| */ | ||
| public function getMessage(): string | ||
| { | ||
| return Translator::getInstance()->getTranslation("mod-install-solution"); | ||
GreisMicha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
GreisMicha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * Get an array of possible patterns | ||
| * | ||
| * The array key of the pattern will be passed to setMatches() | ||
| * | ||
| * @return string[] | ||
| */ | ||
| public static function getPatterns(): array | ||
| { | ||
| return ['/Missing data pack mod:([\w\d\-]+)/']; | ||
| } | ||
|
|
||
| /** | ||
| * Apply the matches from the pattern | ||
| * | ||
| * @param array $matches | ||
| * @param mixed $patternKey | ||
| * @return void | ||
| */ | ||
| public function setMatches(array $matches, mixed $patternKey): void | ||
| { | ||
| $this->modName = $matches[1]; | ||
| $this->addSolution((new ModInstallSolution())->setModName($matches[1])); | ||
GreisMicha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $this->addSolution(new DoNothingSolution()); | ||
| } | ||
| } | ||
43 changes: 43 additions & 0 deletions
43
src/Analysis/Problem/Vanilla/OverworldSettingsMissingProblem.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
|
|
||
| namespace Aternos\Codex\Minecraft\Analysis\Problem\Vanilla; | ||
|
|
||
| use Aternos\Codex\Minecraft\Analysis\Solution\Vanilla\GenerateNewWorldSolution; | ||
| use Aternos\Codex\Minecraft\Translator\Translator; | ||
|
|
||
| class OverworldSettingsMissingProblem extends VanillaProblem | ||
| { | ||
| /** | ||
| * Get a human-readable message | ||
| * | ||
| * @return string | ||
| */ | ||
| public function getMessage(): string | ||
| { | ||
| return Translator::getInstance()->getTranslation("overworld-settings-missing"); | ||
GreisMicha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * Get an array of possible patterns | ||
| * | ||
| * The array key of the pattern will be passed to setMatches() | ||
| * | ||
| * @return string[] | ||
| */ | ||
| public static function getPatterns(): array | ||
| { | ||
| return ['/Overworld settings missing/']; | ||
GreisMicha marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * Apply the matches from the pattern | ||
| * | ||
| * @param array $matches | ||
| * @param mixed $patternKey | ||
| * @return void | ||
| */ | ||
| public function setMatches(array $matches, mixed $patternKey): void | ||
| { | ||
| $this->addSolution(new GenerateNewWorldSolution()); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,225 @@ | ||
| { | ||
| "id": "forge\/server", | ||
| "name": "Forge", | ||
| "type": "Server Log", | ||
| "version": null, | ||
| "title": "Forge Server Log", | ||
| "entries": [ | ||
| { | ||
| "level": 6, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:07.579] [Forge Version Check\/INFO] [net.minecraftforge.fml.VersionChecker\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 1, | ||
| "content": "[29Oct2024 12:58:07.579] [Forge Version Check\/INFO] [net.minecraftforge.fml.VersionChecker\/]: [forge] Found status: BETA Current: 52.0.24 Target: 52.0.24" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 6, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:08.768] [main\/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 2, | ||
| "content": "[29Oct2024 12:58:08.768] [main\/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService\/]: Environment: Environment[sessionHost=https:\/\/sessionserver.mojang.com, servicesHost=https:\/\/api.minecraftservices.com, name=PROD]" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:08.897] [main\/WARN] [net.minecraftforge.common.ForgeHooks\/WP]:", | ||
| "lines": [ | ||
| { | ||
| "number": 3, | ||
| "content": "[29Oct2024 12:58:08.897] [main\/WARN] [net.minecraftforge.common.ForgeHooks\/WP]: The following mods have version differences that were not resolved:" | ||
| }, | ||
| { | ||
| "number": 4, | ||
| "content": "commonnetworking (version 1.0.16-1.21.1 -> MISSING)" | ||
| }, | ||
| { | ||
| "number": 5, | ||
| "content": "journeymap (version 1.21.1-6.0.0-beta.28 -> MISSING)" | ||
| }, | ||
| { | ||
| "number": 6, | ||
| "content": "journeymap_api (version 2.0.0 -> MISSING)" | ||
| }, | ||
| { | ||
| "number": 7, | ||
| "content": "terralith (version 2.5.5 -> MISSING)" | ||
| }, | ||
| { | ||
| "number": 8, | ||
| "content": "Things may not work well." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 7, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.638] [main\/DEBUG] [net.minecraftforge.resource.ResourcePackLoader\/CORE]:", | ||
| "lines": [ | ||
| { | ||
| "number": 9, | ||
| "content": "[29Oct2024 12:58:09.638] [main\/DEBUG] [net.minecraftforge.resource.ResourcePackLoader\/CORE]: Generating PackInfo named mod:forge for mod file \/server\/libraries\/net\/minecraftforge\/forge\/1.21.1-52.0.24\/forge-1.21.1-52.0.24-universal.jar" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 10, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:terralith" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 11, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:commonnetworking" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 12, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:journeymap_api" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 13, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:journeymap" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:10.546] [main\/WARN] [net.minecraft.server.Main\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 14, | ||
| "content": "[29Oct2024 12:58:10.546] [main\/WARN] [net.minecraft.server.Main\/]: Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "analysis": { | ||
| "problems": [ | ||
| { | ||
| "message": "Install the mod '{{mod-name}}'.", | ||
| "counter": 1, | ||
| "entry": { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 10, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:terralith" | ||
| } | ||
| ] | ||
| }, | ||
| "solutions": [ | ||
| { | ||
| "message": "Install the mod 'terralith'." | ||
| }, | ||
| { | ||
| "message": "Do nothing. This problem might fix itself." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "message": "Install the mod '{{mod-name}}'.", | ||
| "counter": 1, | ||
| "entry": { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 11, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:commonnetworking" | ||
| } | ||
| ] | ||
| }, | ||
| "solutions": [ | ||
| { | ||
| "message": "Install the mod 'commonnetworking'." | ||
| }, | ||
| { | ||
| "message": "Do nothing. This problem might fix itself." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "message": "Install the mod '{{mod-name}}'.", | ||
| "counter": 1, | ||
| "entry": { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 12, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:journeymap_api" | ||
| } | ||
| ] | ||
| }, | ||
| "solutions": [ | ||
| { | ||
| "message": "Install the mod 'journeymap_api'." | ||
| }, | ||
| { | ||
| "message": "Do nothing. This problem might fix itself." | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "message": "Install the mod '{{mod-name}}'.", | ||
| "counter": 1, | ||
| "entry": { | ||
| "level": 4, | ||
| "time": null, | ||
| "prefix": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]:", | ||
| "lines": [ | ||
| { | ||
| "number": 13, | ||
| "content": "[29Oct2024 12:58:09.639] [main\/WARN] [net.minecraft.server.MinecraftServer\/]: Missing data pack mod:journeymap" | ||
| } | ||
| ] | ||
| }, | ||
| "solutions": [ | ||
| { | ||
| "message": "Install the mod 'journeymap'." | ||
| }, | ||
| { | ||
| "message": "Do nothing. This problem might fix itself." | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "information": [] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [29Oct2024 12:58:07.579] [Forge Version Check/INFO] [net.minecraftforge.fml.VersionChecker/]: [forge] Found status: BETA Current: 52.0.24 Target: 52.0.24 | ||
| [29Oct2024 12:58:08.768] [main/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD] | ||
| [29Oct2024 12:58:08.897] [main/WARN] [net.minecraftforge.common.ForgeHooks/WP]: The following mods have version differences that were not resolved: | ||
| commonnetworking (version 1.0.16-1.21.1 -> MISSING) | ||
| journeymap (version 1.21.1-6.0.0-beta.28 -> MISSING) | ||
| journeymap_api (version 2.0.0 -> MISSING) | ||
| terralith (version 2.5.5 -> MISSING) | ||
| Things may not work well. | ||
| [29Oct2024 12:58:09.638] [main/DEBUG] [net.minecraftforge.resource.ResourcePackLoader/CORE]: Generating PackInfo named mod:forge for mod file /server/libraries/net/minecraftforge/forge/1.21.1-52.0.24/forge-1.21.1-52.0.24-universal.jar | ||
| [29Oct2024 12:58:09.639] [main/WARN] [net.minecraft.server.MinecraftServer/]: Missing data pack mod:terralith | ||
| [29Oct2024 12:58:09.639] [main/WARN] [net.minecraft.server.MinecraftServer/]: Missing data pack mod:commonnetworking | ||
| [29Oct2024 12:58:09.639] [main/WARN] [net.minecraft.server.MinecraftServer/]: Missing data pack mod:journeymap_api | ||
| [29Oct2024 12:58:09.639] [main/WARN] [net.minecraft.server.MinecraftServer/]: Missing data pack mod:journeymap | ||
| [29Oct2024 12:58:10.546] [main/WARN] [net.minecraft.server.Main/]: Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.