MapperTV / embellishcraft

EmbellishCraft is a Minecraft mod that adds many new blocks and items for decorative purposes.
https://www.curseforge.com/minecraft/mc-mods/embellishcraft
MIT License
1 stars 6 forks source link

[1.16.3] ConfiguredFeatures in Embellishcraft are not registered #24

Closed TelepathicGrunt closed 3 years ago

TelepathicGrunt commented 4 years ago

Hello! I was test running my mod called Blame to see how well it works on modpacks and it seemed to have found that Embellishcraft does not register their ConfiguredFeatures. 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: https://github.com/yungnickyoung/YUNGs-Better-Caves/issues/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. Stuff like the following lines is what should be registered to the WorldgenRegisties at mod init (you can do it in FMLCommonSetupEvent so you have your config ready too) https://github.com/MapperTV/embellishcraft/blob/7ebd6988dca472ef2a25d3e4ce86dcb4c0ef897e/src/main/java/tv/mapper/embellishcraft/world/OreGenerator.java#L58-L62

Here's an example from my mod RepurposedStructures of me registering all my ConfiguredFeatures. https://github.com/TelepathicGrunt/RepurposedStructures/blob/a4e3365e3867b8510952ebf658c415de6e412927/src/main/java/com/telepathicgrunt/repurposedstructures/RSConfiguredFeatures.java#L184-L185

I hope this helps!

Edit: Here's the list of what Blame says are unregistered. It pulled this from the CF's JSON to try and find which mod the CF belongs to: embellishcraft:basalt embellishcraft:gneiss embellishcraft:jade embellishcraft:larvikite embellishcraft:marble embellishcraft:slate

TelepathicGrunt commented 4 years ago

Oh yeah, this is also affecting mapperbase:bitumen_ore. I was gonna report the same issue on there as well until I realized that mod is also by you lol. I don't want to spam you with issue reports so I'll just mention it here. :)

MapperTV commented 4 years ago

It should be good in the latest release. I loaded the mods with Blame and didn't find anything in the logs. If you find something wrong then report it here.

TelepathicGrunt commented 3 years ago

Oof I completely forgot about this report. Sorry about that but yes, the release you and current release fixed the issue and everything is registered. Thank you!