Closed qzwxsaedc closed 1 year ago
I'll check it out soon. Thanks for reporting
Hmm that can't be the reason. It's perfectly fine to do computeIfAbsent on another map while iterating over something else. And that's exactly what is happening. Not sure what you get that error though. This seems to be a bug in UntamedWilds
UntamedWilds seems to be spawning mobs during feature generation. I don't think that's how you should do this to be honest
Right that's the problem. Worldgen happens in another thread. You cannot do entity spawning there. This is a concurrent modification exception because the computeIfAbsent is done in the wrong thread. So report to them
https://github.com/McJtyMods/InControl/blob/235498f73827e0fcc256b0546f43ddbdd599e24f/src/main/java/mcjty/incontrol/rules/RuleCache.java#L208
HashMap.computeIfAbsent() might be modify current map if the specified key is not already associated with a value (or is mapped to null). So you can't use it in foreach.
For example: