Skip to content

ConfiguredFeature API for World Generators #5866

Description

@dfsek

Is your feature request related to a problem?

World generators currently have no way of interacting with Vanilla's "Configured Features", an essential part of world generation which defines "features" to generate in the world, based on "configurations."

Examples of things generated by features include:

  • Trees
  • Grass
  • Flowers
  • Ores

World generators must currently re-implement all these on their own. There should be API to use the Vanilla features, and, ideally, to create and register custom features.

Describe the solution you'd like.

I will be using the Yarn names for the following Spigot-named classes:

  • WorldGenFeatureConfigured -> ConfiguredFeature
  • WorldGenFeatureConfiguration -> FeatureConfig
  • WorldGenerator -> Feature

Add interfaces which delegate to Feature, FeatureConfig, and ConfiguredFeature. Add a registry which is populated with the default configured features, with the option for plugins to register their own.
On its own, this API is only useful to "clean up" and standardize custom world generators. With just this API, plugins would still have to manually place their features.

This would be very powerful when paired with a custom biome API, however, since with a custom BiomeSource using custom biomes, plugins could simply register their features to their biomes to have them generated.

Ideally, there would also initially be API to add features to Vanilla biomes. This would make gross BlockPopulator hacks to add things to Vanilla worlds obsolete.

Describe alternatives you've considered.

Plugins currently must implement all features manually, with no standardized API to work from.

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
  • I have ensured the feature I'm requesting isn't already in the latest supported Paper build.

Other

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: futureIssue scheduled for resolution at some point in the future.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.version: 1.17Game version 1.17

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions