
EmendatusEnigmatica configuredfeatures are not registered
TelepathicGrunt opened this issue ยท 3 comments
Hello! Someone was running my mod called Blame with your mod and it seemed to have found that
basically no ConfiguredFeature is registered in EmendatusEnigmatica. This can be an issue for mod compatibility as under certain conditions, unregistered ConfiguredFeatures can basically prevent other mod's registered ConfiguredFeatures from spawning if in the same generation stage.
By that I mean, if mod A adds an unregistered CF to the ore generation stage and the biome's codec reaches it first, it will choke and basically nuke mob B's registered CFs afterwards. Here's a case where BetterCaves forgot to register their CF and caused several CFs from Oh The Biomes You'll Go to stop spawning in the world: YUNG-GANG/YUNGs-Better-Caves#75
Here's a more detailed explanation of why this happens in the biome's codec:
Specifically, when you call .withConfiguration on a Feature, you create a ConfiguredFeature. This is what should be registered to the WorldgenRegisties at mod init (you can do it in FMLCommonSetupEvent so you have your config ready too if it is needed).
Anyway here's an example from my mod RepurposedStructures of me registering all my ConfiguredFeatures.
https://github.com/TelepathicGrunt/RepurposedStructures/blob/084cea914c015ab745ce2807fee0f15f2b88f7d8/src/main/java/com/telepathicgrunt/repurposedstructures/modinit/RSConfiguredStructures.java#L95-L102
I hope this helps!
From the log with Blame where it tried to figure out what unnamed configuredfeature is unregistered by parsing its json: https://hatebin.com/htpjvgmsaz
Hello there, would it be possible to provide me with the config used by the player please, or just ask them to reach out to me on Discord. I'm unable to replicate it on my side, and chances are I might be missing something here.
This is reproduceable with just EmendatusEnigmatica-1.16.5-1.2.3 alone. Testing now, I only had that mod and blame-1.16.4-1.9.2 on. It still reports that there are unregistered configuredfeatures.
Latest.log file: https://paste.ee/p/n0kJ7
Config (which is default): https://paste.ee/p/PRvmV
Also of note is Forge is viewing the default config as invalid and makes a .bak file and a new config file every time the game is launched.
I'm not seeing any usage of WorldGenRegistries.CONFIGURED_STRUCTURE_FEATURE anywhere in the mod which means there are not being registered to the Minecraft registry.
You should try registering the resultant configuredfeature being returned here into the WorldGenRegistries with a unique resourcelocation (the configuredfeature that comes out of .count(count) btw). This should resolve the issue if ModConfig.Loading event is the one that fires before a world is even clicked on. Once a world is clicked on or being made, it's too late to register the configuredfeatures