Jump to content

[1.18.1] How to add tree Features ?


zlappedx3

Recommended Posts

Normally in 1.17.1 i use BiomeLoadingEvent#getGeneration()#getFeatures() then and add some Supplier ConfiguredFeature<?, ?>

But in 1.18.1 it want PlacedFeature and i look ConfiguredFeature class i see placed() method.

Ummmmm Let's go back to 1.17.1 on decorated() method by put this parameter

.decorated(Features.Decorators.HEIGHTMAP_SQUARE).decorated(FeatureDecorator.COUNT_EXTRA.configured(new FrequencyWithExtraChanceDecoratorConfiguration(1, 0.1F, 1)))

Okay now coming to 1.18.1 i use placed() method by put this parameter.

.placed(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, PlacementUtils.countExtra(1, 0.1F, 1))

but there are no trees, 
Is there a way to make a tree spawn?

Link to comment
Share on other sites

the Features class from 1.17 has been split into separate classes,
the Tree Features are now in net.minecraft.data.worldgen.features.TreeFeatures

in 1.18 you need also a PlacedFeature for each ConfiguredFeature,
you can find the vanilla Tree examples in net.minecraft.data.worldgen.placement.TreePlacements

 

  • Like 1
Link to comment
Share on other sites

why did you not create the Features (ConfiguredFeature and PlacedFeature), in the same way how vanilla does it?
you don't need to extends/overwrite something

also the classes i told you above has a lot of examples

Edited by Luis_ST
Link to comment
Share on other sites

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

×   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.

Announcements



×
×
  • Create New...

Important Information

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