Fruit Trees ๐ŸŠ

Fruit Trees ๐ŸŠ

4M Downloads

[1.16.4] FruitTrees configuredfeatures are not registered

TelepathicGrunt opened this issue ยท 3 comments

commented

Hello! Someone was running my mod called Blame with a small modpack and it seemed to have found that FruitTrees's ConfiguredFeatures 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 for block names, feature names, etc:


****************** Blame Report 1.9.2 ******************

This is an experimental report. It is suppose to automatically read
the JSON of all the unregistered ConfiguredFeatures, ConfiguredStructures,
and ConfiguredCarvers. Then does its best to collect the terms that seem to
state whose mod the unregistered unnamed stuff belongs to.

Possible mods responsible for unregistered stuff:

fruittrees:blob
fruittrees:carpet
fruittrees:cherry_carpet
fruittrees:cherry_leaves
fruittrees:cherry_log
fruittrees:citron_leaves
fruittrees:citrus_log
fruittrees:lime_leaves
fruittrees:mandarin_leaves

commented

Hello, are you or someone else running the latest version of Fruit Trees?

commented

Hang on. I forgot to check what version they were using. I was just going through their log and reporting unregistered stuff to mods lol. My bad. give me a sec

commented

and yeah it's fixed in 2.2.2. lol. Definitely my bad. I'll tell the person to update. Sorry about that!