Create

Create

86M Downloads

[1.16.3] Copper and Zinc ConfiguredFeatures are not registered

TelepathicGrunt opened this issue · 7 comments

commented

Hello! I was running my mod called Blame with Create and it seemed to have found that Create's ConfiguredFeature forms of copper and zinc 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: 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 .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 where it tried to figure out what unnamed configuredfeature is unregistered by parsing its json.
https://hastebin.com/volaroxira.yaml

Specifically, it looks like create:copper_ore and create:zinc_ore needs to be registered and there's 2 separate configuredfeatures of each.

commented

Does this still affect other mods' generation if you disable Create's worldgen in the config?

commented

@laserlemons If disabling the worldgen prevents the unregistered configuredfeatures from being added to biomes at all, then yes, the other mod's ores will be safe. The issue is when the game converts the biome from code to json and back, everything in the biome needs to be registered. Otherwise, the game is going through the configuredfeatures registry names, gets to one that isn't registered and is just a json object instead of a registry name, and now it will attempt to read all the entries afterwards as json objects instead of registry names which means those will blow up. If you see "Not a JSON Object" error in your latest.log file, that means those features it listed was nuked out of biomes by an unregistered configuredfeature.

commented

@TelepathicGrunt I was unable to find "Not a JSON Object" in latest.log with or without disabling worldgen in the config. Does that mean the issue is not occurring in my instance?

commented

You may be fine but keep an eye out for any missing modded ores in your world. It is also dependent on the order that the ores are added to biomes which makes it tricky to know if it will cause issues or not.

commented

It appears to be the case that copper, etc, are now properly configured but zinc is not.

commented

Looks like there are confirmed reports of the currently released Create nuking ConfiguredFeatures from other biomes now. Example being BYG’s end biome.

67013FA6-6615-4395-B969-70538CAAEB7F
4D14F134-DE46-49FC-9854-6094013F1C40

commented

This was resolved in the newest update for 1.16.5_v0.3.1 Create that was just released! Closing report now