This issue happened for Folder Packs.
When a resource pack and a data pack folder (and therefore the resource packs) have the same name, either overrides the other.
Which one is overridden is arbitrary and can vary between pack restarts.
In this example, either the resources are present ingame, or the data (in my case, loot tables), but not both.
Workaround as user
Rename either of the packs.
Technical Remarks
Inside ResourcePackList (Vanilla Class), the pack finders for data packs and resource packs are registered and stored in a HashSet.
Since OpenLoaderPackFinder does not override .hashCode the position of these loaders in the Set is arbitrary, which explains why it is not constant which pack is overridden by the other.
As both PackFinders only use the pack folder's name, the data pack and the resource pack will end up with the same name.
Since the ResourcePackList will use the found packs' name to put them in a Map<String, ResourcePackInfo> the 2nd pack will override the first one.
The issue
This issue happened for Folder Packs. When a resource pack and a data pack folder (and therefore the resource packs) have the same name, either overrides the other. Which one is overridden is arbitrary and can vary between pack restarts.
Example:
In this example, either the resources are present ingame, or the data (in my case, loot tables), but not both.
Workaround as user
Rename either of the packs.
Technical Remarks
Inside ResourcePackList (Vanilla Class), the pack finders for data packs and resource packs are registered and stored in a HashSet. Since OpenLoaderPackFinder does not override
.hashCode
the position of these loaders in the Set is arbitrary, which explains why it is not constant which pack is overridden by the other.As both PackFinders only use the pack folder's name, the data pack and the resource pack will end up with the same name. Since the ResourcePackList will use the found packs' name to put them in a
Map<String, ResourcePackInfo>
the 2nd pack will override the first one.