Jeryn99 / Weeping-Angels

Minecraft Mod - Adds the terrifying Weeping Angels to the Game, Minecraft. Don't Blink!
https://minecraft.curseforge.com/projects/weeping-angels-mod
GNU Affero General Public License v3.0
36 stars 20 forks source link

arm_snow_feature and kontron_ore's ConfiguredFeature forms need to be registered #142

Closed TelepathicGrunt closed 3 years ago

TelepathicGrunt commented 3 years ago

Hello! I was test running my mod called Blame with a bunch of mods and it seemed to have found that Weeping-Angels has 2 ConfiguredFeatures that are not registered. 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: yungnickyoung/YUNGs-Better-Caves#75

Here's a more detailed explanation of why this happens in the biome's codec: image

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/584433a0745338802c84e9f498dc063c1f5505f8/src/main/java/com/telepathicgrunt/repurposedstructures/modinit/RSConfiguredStructures.java#L72-L74

I hope this helps!

From the log with Blame: weeping_angels:arm_snow_feature weeping_angels:kontron_ore

Jeryn99 commented 3 years ago

Thanks for letting me know. Me or @50ap5ud5 will have this fixed as soon as we can!

50ap5ud5 commented 3 years ago

Thanks for reporting this TelepathicGrunt! This will be fixed in the next build.