Jump to content

[1.16.3] Custom Flower Generation In Vanilla Biomes


Recommended Posts



I have problems updating my flower generation to 1.16.3. As already mentioned in the topic, I want to make my custom flower generate in some vanilla biomes. Here is my code: 

	public static void setupFlowerGeneration() {
		for(Biome biome: ForgeRegistries.BIOMES) {
			if(biome==ForgeRegistries.BIOMES.getValue(new ResourceLocation("savanna"))){
				BiomeGenerationSettings.Builder GENERATION_SETTINGS = (new BiomeGenerationSettings.Builder()).func_242519_a(biome.func_242440_e().func_242500_d());
				GENERATION_SETTINGS.func_242513_a(GenerationStage.Decoration.VEGETAL_DECORATION, BiomeFeatures.HEART_FLOWER);

My BiomeFeatures.HEART_FLOWER looks like this:

public static final ConfiguredFeature<?, ?> HEART_FLOWER = register("heart_flower", Feature.RANDOM_PATCH.withConfiguration((new BlockClusterFeatureConfig.Builder((new WeightedBlockStateProvider()).addWeightedBlockstate(BlockList.heart_flower.getDefaultState(), 2), new SimpleBlockPlacer())).tries(64).build()).withPlacement(Placement.TOP_SOLID_HEIGHTMAP.configure(new NoPlacementConfig())));
	 private static <FC extends IFeatureConfig> ConfiguredFeature<FC, ?> register(String key, ConfiguredFeature<FC, ?> feature)
	        return Registry.register(WorldGenRegistries.field_243653_e, new ResourceLocation(DeepAffection.modid, key), feature);

I also already tested: The setupFlowerGeneration() method gets called and also the if gets called, but somehow my flowers don't generate.

By the way - I can see on github of other people that their methods have clear names while mine always only have those func_1231411513 names. Does anyone know why I have this?


I hope someone can help me - Thank you in advance. :) 

Link to comment
Share on other sites

On 9/26/2020 at 8:26 PM, ChampionAsh5357 said:

That's not how biomes are handled anymore. You need to apply it via BiomeLoadingEvent. Also, the register to WorldGenRegistries is a bit pointless as you are attaching it to the biome directly after it has been created.

Okay. Do I have to register my ConfiguredFeature somewhere else or am I able to use it without registering?

Link to comment
Share on other sites

  • 8 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.