Mystical Agriculture

Mystical Agriculture

86M Downloads

Asynchronous Registy Order Loading Crash 1.15.2

P3rf3ctXZer0 opened this issue · 15 comments

commented

I'm going to assume this is fixed.

commented

yeah sorry sometimes I forget to close issues.

commented

Is this the only error in the log file?

commented

Yeah.

commented

It happend with @Thutmose and his mod Thut Wearables.

commented

The way forge handles extension mods with asynchronous loading has made dependency mods run before the dependency runs. This cause a false "Registry Error" I have more examples if you would like. I am also sure if you message @Thutmose he could explain how to add the needed fix.

Fun fact thanks to the nature of the crash it only happens 20% of the time.

commented

The only way I can see this crash happening is if the blocks don't get registered, which usually happens if another error happens prior. Can I get the full log because there should be another error that atleast says where it crashed.

commented

As soon as your mod crashes again since I have a lot of mods with dependancies and I added more so now the crash is about 7% of the time.

commented

I would agree if this was 1.12.2 but seems like 1.15.2 doesn't suffer reg issues the same way (typically)

commented

I think I might have a solution actually, so dont worry about it.

commented

the forge block/item registration is asynchronous now, so in the case where an addon requires something that has not been made by the main mod yet, then you can have this sort of issue occur if said addon happens to reach that stage first.

commented

That doesn't seem relevant in this case since neither of these mods depend on each others blocks during registration. What it actually looks like is happening is that the RegistryObjects for the blocks sometimes aren't being updated in time for item registration (which they should as far as I know) and therefor throwing that error. I should just have to manually update the references and this shouldn't happen anymore.

The reason I assumed that this had to do with other errors (which my still be the case) is because generally when I have issues like this that's where they stem from.

commented

This error is caused by a class that didn't exist in 1.12 so I'm not sure what you mean. It has nothing to do with dependencies or load order.

commented

well glad I can help - fyi not a coder.

commented

If my theory is correct then 3.0.6 should not have this issue 🤞