Open Darkosto opened 3 years ago
Overloaded does mess with the load order but should only be putting overloaded_cb last nothing else should be affected.
How are you testing this? That snippet is designed to be unpredictable as in many JVM versions as sets have no defined order so should always use list.
It's your code.. Hence the problem. https://github.com/CJ-MC-Mods/Overloaded-Compressed-Blocks/blob/1.16/src/main/java/com/cjm721/overloaded/cb/CompressedBlocks.java#L78
Beyond that you shouldn't need to hack any of this together at all. But that's a whole different argument.
Thank you for pointing that I am using a non-definite order set, will fix it probably tomorrow. That is what I get for not having code reviews, and having spent to many hours trying to fix it from a less intrusive method I use to be able to use in previous versions of Forge.
As for having to hack it, this was the least intrusive way I found so if there is documentation now about how to add in-code data-pack that are enabled by default can you please provide it.
Above commit won't truly fix it if the issue is ordering by that line as OCB would always be last overall instead of last of the mod section.
Previously had just made a data-pack and in its meta set it as always enabled and told the server to reload and everything was good. I believe that changed somewhere between 1.14 and 1.16 which is what caused my changes. May need to go see if that was a bug of it being broken in Forge that I just worked around or intentional changes which would mean need more information (previous comment about wanting documentation).
Hey CJ!
I have a bit of an issue with this mod: something is breaking the load order of datapacks and causes the list to be unpredictable. The load order should be Vanilla, Mods, then added DataPacks. For some reason, with Overloaded, it will rearrange that order randomly. Is this something you would be able to look into? I can help give any more information if you'd like!
This might be helpful to check out:
Set<String> packNames = event.getServer().getResourcePacks().getEnabledPacks().stream().map(pack -> pack.getName()).collect(Collectors.toSet());
Thanks! Darkosto