Simple Farming

Simple Farming

11M Downloads

[1.16.3] ConfiguredFeatures in SimpleFarming are not registered

TelepathicGrunt opened this issue ยท 2 comments

commented

Hello! I was test running my mod called Blame to see how well it works on modpacks and it seemed to have found that SimpleFarming 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 .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). I would link the like of code that is making the CFs in your code to help show exactly what it is but there seems to be no 1.16 branch put on this GitHub yet.

Anyway 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!

The CFs that Blame found that are unregistered are these. It pulled those entries out of the CF's JSON to try its best to find which mod the CFs are from:

simplefarming:berry_bush
simplefarming:cactus_crop
simplefarming:fruit_tree
simplefarming:wild_plant

commented

My game isnt loading, and I think the problem might be this one :3

latest.log

commented

@Blugori I think you have an entirely different issue. Something is extremely weird with your log. Other mods are unable to register their stuff, simplefarming cant set properties on their own block, and repurposed structures's stuff is being registered twice when it should only happen once. You should check your mod folder to make sure you dont have multiple versions of one mod in there. Then try removing mods until you can find what is causing your really strange issue