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

fix: apply resource packs in the specified order #29

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

EchoEllet
Copy link
Collaborator

When the option applyResourcePacks is true:

{
  "resourcePackSyncInfo": {
    "applyResourcePacks": true,
    "resourcePacks": [
      {
        "downloadUrl": "https://cdn.example.com/data/RRxvWKNL/versions/roiZsJIW/ResourcePack1.zip"
      },
      {
        "downloadUrl": "https://cdn.example.com/data/U5SedG9S/versions/3fjew8Kj/ResourcePack2.zip"
      },
      {
        "downloadUrl": "https://cdn.example.com/data/dspKZXKP/versions/1lwmCieT/ResourcePack3.zip"
      }
    ]
  }
}

The script previously did not apply the resource packs in the specified order. Now, resource packs will be applied in the order listed, aligning with how Minecraft stores the list of applied resource packs in options.txt (which is stored in .minecraft). Items at the beginning of the list have lower priority, while those at the end have higher priority. For example:

resourcePacks:["file/ResourcePack1.zip", "file/ResourcePack2.zip", "file/ResourcePack3.zip"]

In this order, ResourcePack3.zip has the highest priority, and ResourcePack1.zip has the lowest.

Note

This feature is still considered to be experimental.

@EchoEllet EchoEllet marked this pull request as ready for review August 22, 2024 14:47
@EchoEllet EchoEllet merged commit 2db2a72 into main Aug 22, 2024
1 check passed
@EchoEllet EchoEllet deleted the fix/resource-pack-apply-order branch August 22, 2024 14:47
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