Class SimpleRandomFeature
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.Feature<SimpleRandomFeature.Config>
com.github.darksoulq.abyssallib.world.gen.feature.impl.SimpleRandomFeature
A meta-feature that randomly selects exactly one sub-feature from a provided
list, giving each option an equal probability of selection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordConfiguration record for the simple random feature. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new SimpleRandomFeature with its associated configuration codec. -
Method Summary
Modifier and TypeMethodDescriptiongetPhase(SimpleRandomFeature.Config config) Specifies the procedural generation phase in which this feature executes.booleanSelects one feature from the configured list and delegates placement to it.
-
Constructor Details
-
SimpleRandomFeature
public SimpleRandomFeature()Constructs a new SimpleRandomFeature with its associated configuration codec.
-
-
Method Details
-
place
Selects one feature from the configured list and delegates placement to it.- Specified by:
placein classFeature<SimpleRandomFeature.Config>- Parameters:
context- The feature place context providing world access and configuration.- Returns:
- True if the selected feature successfully placed blocks.
-
getPhase
Specifies the procedural generation phase in which this feature executes.- Overrides:
getPhasein classFeature<SimpleRandomFeature.Config>- Parameters:
config- The configuration containing the sub-features.- Returns:
- The dynamic generation phase of the underlying selected feature.
-