Skip to content

showAsData/ResourcePack ignores dependency loading order #2395

@ChiefArug

Description

@ChiefArug

Minecraft Version: 1.21.1, however through code analysis I have determined this is an issue for 1.20.4-1.21.7 (since #400)

NeoForge Version: 21.1.174, See comment above

Steps to Reproduce:

  1. Add a pack.mcmeta file to the root of mod resources, like this one:
{
  "pack": {
    "description": "a test pack.mcmeta",
    "pack_format": 10
  }
}
  1. In the neoforge.mods.toml file set a dependency on neoforge with load order set to AFTER, like so:
[[dependencies."${modid}"]]
    modId="neoforge"
    type="required"
    versionRange="[21.1.174,)"
    ordering="AFTER"
    side="BOTH"
  1. Also in the neoforge.mods.toml file set showAsDataPack to true:
    (note this is a file property, not a mod property, so must be placed above [[mods]])
showAsDataPack=true
  1. Start the game and open the create world screen, then go to the More tab and select Data Packs
  2. Note that the mod datapack is below the Mod Data grouped pack despite being told to explicitly load after neo.

Description of issue:
In ResourcePackLoader all packs that need to be separate are added to the pack consumer:


before the grouped pack is added:
packAcceptor.accept(makePack(packType, hiddenPacks));

which causes this issue.
Solving this to respect mod loader order is very difficult, as you can easily construct a situation where the grouped pack would need to be split to properly order mod sources.
An easier solution would be to make these separate packs always load after the rest of the mod resources, as that is the more common option for people to want to do, or change the boolean option to an enum option of something like GROUPED, ABOVE, BELOW that determines where it goes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds triaging and confirmation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions