Class RandomBooleanFeature
java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.Feature<RandomBooleanFeature.Config>
com.github.darksoulq.abyssallib.world.gen.feature.impl.RandomBooleanFeature
A meta-feature that performs a boolean roll to decide between two distinct sub-features.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordConfiguration record for the random boolean feature. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RandomBooleanFeature with its associated configuration codec. -
Method Summary
Modifier and TypeMethodDescriptiongetPhase(RandomBooleanFeature.Config config) Specifies the procedural generation phase in which this feature executes.booleanExecutes the boolean roll and delegates placement to the winning feature.
-
Constructor Details
-
RandomBooleanFeature
public RandomBooleanFeature()Constructs a new RandomBooleanFeature with its associated configuration codec.
-
-
Method Details
-
place
Executes the boolean roll and delegates placement to the winning feature.- Specified by:
placein classFeature<RandomBooleanFeature.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<RandomBooleanFeature.Config>- Parameters:
config- The configuration containing the sub-features.- Returns:
- The dynamic generation phase of the underlying feature.
-