Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

API thread safety

williewillus opened this issue ยท 1 comments

commented

Hey! Saw this posted on discord and the API looks pretty modern and clean, so I'm evaluating replacing Baubles with this in Botania 1.13.x.

One thing I noticed is that this method is encouraged to be called during FMLCommonSetupEvent, but that event dispatches in parallel, meaning that CuriosRegistry might be accessed by multiple threads and have race conditions. Changing the map to be concurrent should probably fix it.

commented

Ah right, good catch! I'll fix that. And if you have any other ideas/concerns, feel free to let me know. It'd be great if a mod as popular as Botania ended up using this API.