BaseAnimationSetConfig.id = 15
Number of files being encoded = 1
Edit: After some investigating, I've found out the issue to be the fact that it adds in the middle of the groups. The map behind the groups must be sorted for some reason, so adding this:
val settings = configArchive.groupSettings.toSortedMap()
configArchive.groupSettings.clear()
settings.forEach { (key, value) -> configArchive.groupSettings[key] = value }
Right before the cache.writeArchive(configArchive) solved the issue.
The same issue applies for individual files. They must be sorted manually by the user, or else it corrupts the cache and writes the ids completely weird.
Adding a brand-new group doesn't seem to actually write said group into the cache. The code used to write:
BaseAnimationSetConfig.id = 15 Number of files being encoded = 1
Edit: After some investigating, I've found out the issue to be the fact that it adds in the middle of the groups. The map behind the groups must be sorted for some reason, so adding this:
Right before the
cache.writeArchive(configArchive)
solved the issue.The same issue applies for individual files. They must be sorted manually by the user, or else it corrupts the cache and writes the ids completely weird.