Class RandomFeature

java.lang.Object
com.github.darksoulq.abyssallib.world.gen.feature.Feature<RandomFeature.Config>
com.github.darksoulq.abyssallib.world.gen.feature.impl.RandomFeature

public class RandomFeature extends Feature<RandomFeature.Config>
A meta-feature that evaluates a list of potential sub-features sequentially, placing the first one that passes its individual probability check.
  • Constructor Details

    • RandomFeature

      public RandomFeature()
      Constructs a new RandomFeature with its associated configuration codec.
  • Method Details

    • place

      public boolean place(FeaturePlaceContext<RandomFeature.Config> context)
      Executes the sequential probability checks and delegates placement to the selected feature.
      Specified by:
      place in class Feature<RandomFeature.Config>
      Parameters:
      context - The feature place context providing world access and configuration.
      Returns:
      True if the selected feature successfully placed blocks.
    • getPhase

      public GenerationPhase getPhase(RandomFeature.Config config)
      Specifies the procedural generation phase in which this feature executes.
      Overrides:
      getPhase in class Feature<RandomFeature.Config>
      Parameters:
      config - The configuration containing the sub-features.
      Returns:
      The dynamic generation phase of the underlying fallback feature.