[1.16.3] Sandwichable is not registering its configuredfeatures
TelepathicGrunt opened this issue ยท 6 comments
Hello! I was helping someone out with their collection of mods and tried it with DebugWorldgenIssues mod. What it found was that sandwichable 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: 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 .configure on a Feature, you create a ConfiguredFeature. This is what should be registered to the WorldgenRegisties at mod init.
Anyway here's an example from my mod RepurposedStructures of me registering all my ConfiguredFeatures.
https://github.com/TelepathicGrunt/RepurposedStructures-Fabric/blob/588ede281d77cd8603cb4126ef5fbbfebcaf5b86/src/main/java/com/telepathicgrunt/repurposedstructures/RSConfiguredFeatures.java#L193-L195
I hope this helps!
still an issue in v1.2 BETA 1. Just wanted to make sure this issue report isnt forgotten. Someone came to me with AE2 and Indrev's Nikolite ore no longer spawning and is dying. I had the person throw on the DebugWorldgenIssues and well, it's due to sandwichable unregistered configuredfeatures it seems.
Someone told me to not use the curseforge build so my bad on the previous report. But even with the latest commit, it seems DebugWorldgenIssues is still throwing a fit. An idea I have is that perhaps this registry callback needs to be replaced with fabric api's biome modification api which would be the proper way to add to biomes. I believe the issue is due to taking the builtinregistry registered configuredfeature instance and trying to add it to the dynamicregistry biome when the dynamicregistry as a different instance of the configuredfeature registered (due to minecraft literally rebuilding the configuredfeature when the dynamicregistry imports from the builtinregistry). The biome modification api should fix it as it was made with this distinction in mind.
example:
BiomeModifications.create(new Identitifer(Sandwichable.MODID, "salty_sands_configured")).add(
ModificationPhase.ADDITIONS,
BiomeSelectors.categories(Biome.Category.OCEAN, Biome.Category.BEACH),
(context) -> context.getGenerationSettings().addBuiltInFeature(GenerationStep.Feature.UNDERGROUND_ORES, SALTY_SAND_CONFIGURED));
Forgot to register a couple of new CFs in that commit, it's all fixed in the latest commit and version 1.2-beta2
I'm closing any issues labeled Fixed in Development so I can work on fixing open issues.
Those two have not been configured, yes... This should be fixed soon but all other configured features have been registered.