Forbidden and Arcanus

Forbidden and Arcanus

33M Downloads

Register the configuredfeatures under Forbidden Arcanus's modid and before BiomeLoadingEvent

TelepathicGrunt opened this issue ยท 3 comments

commented

I was helping someone trying to spawn Forbidden Arcanus's trees with worldgen datapacks and we couldn't get "forbidden_arcanus:mysterywood" to work. I looked at the code to make sure it was correct and I see the register method being used:

return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, name, configuredFeature);

The register method just takes the "mysterywood" name passed in and just uses that to register which means Minecraft automatically append "minecraft:" to the front. So it actually "minecraft:mysterywood" in the registry. A quick change of name to new ResourceLocation(ForbiddenArcanus.MOD_ID, name) will fix this. Be sure to double check the other register methods in case they are doing the same issue.

I hope this helps!

commented

Fixed in 16.2.0

commented

Also, please classload ModConfiguredFeatures in FMLCommonSetupEvent as the features needs to be registered before the world is clicked on as otherwise, people cannot grab your configuredfeatures with datapacks. Right now, I breakpointed the mod and the tree configuredfeatures are being registered during BiomeLoadingEvent which is way too late because that event fires after worldgen datapacks are parsed. Which makes the trees actually "unregistered" configuredfeatures and could also nuke registered ones from biomes in rare cases too.

Here's an example of what I do to register my configuredfeatures safely and early enough: https://github.com/TelepathicGrunt/RepurposedStructures/blob/f6ef1a0b4aac6f29f489717252fe451a0d655c10/src/main/java/com/telepathicgrunt/repurposedstructures/RepurposedStructures.java#L128

commented

This is also affecting me. I would like to add Mysterywood and the Yellow Orchid for a couple of my packs and am unable to.