I'm working on a system to retrieve the length of sounds. I already have a system to cache the lengths into a JSON file using datagen, and I get the following error: java.util.concurrent.CompletionException: java.lang.IllegalStateException: Registry is already frozen (trying to add key ResourceKey[minecraft:sound_event / darkwest:conner_voiceline])
I've tried everything to solve it. Restructuring my asset loading, moving to Fabric's ResourceManagerHelper instead of my own weird custom asset loading. The only GitHub issue I've seen regarding this error says I need Fabric API to solve it, but I am literally depending on Fabric API and I'm still getting this error.
Here's my SoundsResourceReloader class: https://pastebin.com/fyq0ynvb
I'm registering it in my ModInitializer
ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES)
.registerReloadListener(new SoundsResourceReloader());
I've tried registering all the sounds separately outside the resource reloader (in onInitialize) and only loading the data inside the reload listener but I got the same error. Calling Registry.register doesn't work for any of my sounds.
PS: please ping when replying!! sorry if i reply a bit late im going to bed after posting this
