(1.15.2) ConcurrentModificationException thrown when ran with C.O.M.B.A.T. mod.
TelepathicGrunt opened this issue ยท 1 comments
When running Geolosys with a ton of mods, I have received a crash and checking the crashlog shows that Geolosys's FeatureStripper is removing features while another mod is iterating over them.
The solution is actually very simple as I had to problem too before someone showed me what to do. In you mod's main class, change FeatureStripper.strip(0);
to DeferredWorkQueue.runLater(FeatureStripper::strip);
and remove the parameter. What this will do is run your stripping code after all other mods have ran so there is no concurrent modification issue (and that you dont need that loop anymore inside FeatureStripper!)
I hope this help! If you're doing this in 1.14 as well, then this solution should work there too. Extra info below:
Crashlog: https://hatebin.com/qzoqalqzor
The problematic Geolosys line:
Example of the solution I used in my own mod: https://github.com/TelepathicGrunt/RepurposedStructures/blob/51b72424992532c8f3dc97e36bb108ccb23dc65b/src/main/java/com/telepathicgrunt/repurposedstructures/RepurposedStructures.java#L47
COMBAT mod: https://www.curseforge.com/minecraft/mc-mods/c-o-m-b-a-t