Blockus

Blockus

7M Downloads

[1.16.3] Blockus not registering its configuredfeatures

TelepathicGrunt opened this issue ยท 0 comments

commented

Hello! I was helping someone out with their collection of mods and tried it with DebugWorldgenIssues mod. What it found was that Blockus 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:
image

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!

image