Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello,

 

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. :) 

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.

  • Author
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?

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

Also, the register to WorldGenRegistries is a bit pointless as you are attaching it to the biome directly after it has been created.

 

  • 8 months later...
7 minutes ago, Nephty said:

Have you been able to generate them properly ? I'm struggling on that bit

create your own thread

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.