Class RandomFeatureConfiguration.Builder
java.lang.Object
dev.wyck.worldgen.feature.configurations.RandomFeatureConfiguration.Builder
- Enclosing interface:
RandomFeatureConfiguration
Builder for
RandomFeatureConfiguration.- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration.defaultFeature(PlacedFeature defaultFeature) Sets the default placed feature.feature(RandomFeatureConfiguration.WeightedPlacedFeature... features) Adds multiple weighted placed features to the list.feature(PlacedFeature feature, float chance) Adds a weighted placed feature to the list.Sets the list of weighted placed features.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
features
@AsOf("3.0.0") public RandomFeatureConfiguration.Builder features(List<RandomFeatureConfiguration.WeightedPlacedFeature> features) Sets the list of weighted placed features.- Parameters:
features- the list of weighted placed features- Returns:
- this builder
- Since:
- 3.0.0
-
defaultFeature
@AsOf("3.0.0") public RandomFeatureConfiguration.Builder defaultFeature(PlacedFeature defaultFeature) Sets the default placed feature.- Parameters:
defaultFeature- the default placed feature- Returns:
- this builder
- Since:
- 3.0.0
-
feature
@AsOf("3.0.0") public RandomFeatureConfiguration.Builder feature(PlacedFeature feature, float chance) Adds a weighted placed feature to the list.- Parameters:
feature- the placed featurechance- the chance of the feature being placed (between 0.0 and 1.0)- Returns:
- this builder
- Since:
- 3.0.0
-
feature
@AsOf("3.0.0") public RandomFeatureConfiguration.Builder feature(RandomFeatureConfiguration.WeightedPlacedFeature... features) Adds multiple weighted placed features to the list.- Parameters:
features- the weighted placed features to add- Returns:
- this builder
- Since:
- 3.0.0
-
build
Builds the configuration.- Returns:
- the configuration
- Since:
- 3.0.0
-