Skip to content
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

Implement parsing of launcher instance files #5

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

HaXrDEV
Copy link
Owner

@HaXrDEV HaXrDEV commented Oct 31, 2024

Implements #1

Checklist:

  • Implement robust fallback feature.
  • Add support for the major launchers.
  • Verify that everything works as expected.
  • Update README to include new functionality.

Launchers supported:

  • CurseForge
  • Prism
  • ATLauncher
  • Modrinth
  • GDLauncher

@HaXrDEV HaXrDEV changed the title Automatically parse CurseForges minecraftinstance.json for modpack info CurseForge minecraftinstance.json parsing Oct 31, 2024
@HaXrDEV HaXrDEV changed the title CurseForge minecraftinstance.json parsing Implement CurseForge minecraftinstance.json parsing Oct 31, 2024
@HaXrDEV HaXrDEV changed the title Implement CurseForge minecraftinstance.json parsing Implement parsing of CurseForges minecraftinstance.json Oct 31, 2024
Also removed parseMinecraftInstanceJson config option in favor of making it determined by a prioritized order (BCC > CF > MMC)

Moved the checking of which file to parse into its own getFilePath() method.

Also added a bespoke error message for when no supported file is found.

Also bumped mod version to 2.2.0.
@HaXrDEV HaXrDEV changed the title Implement parsing of CurseForges minecraftinstance.json Implement parsing of launcher instance files Nov 4, 2024
(Modpack version always returns as Unknown as as the file doesn't actually contain it)

Rewrote modpackInfo() & writeResourceTextFile() functions to account for instances where a value doesn't exist or is empty.
… at all

Added getJsonValue function allow for getting nested values such as "modpack::version_id".
Also updated changelog.

Crashing issue was caused by the saveToFile() function not being correctly injected into. This is due to there being two instances of saveToFile in 1.21 and above. (This never happened when launching the game from IntelliJ)
This was the true culprit of the crashing issue. I wish it didn't take this long for me to figure out xD
According to AzureLib, NeoForge doesn't need to have the refmap specified https://modrinth.com/mod/azurelib/version/eROWkpr4

Also added the refmap line to the mixin file for Forge.
This seems to fix the refmap issue too. Have therefore reverted the fix i had put in previously.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant