Record Class ConfiguredFeature<C extends FeatureConfig, F extends Feature<C>>
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.ConfiguredFeature<C,F>
- Type Parameters:
C- The specific configuration type.F- The specific feature type.- Record Components:
feature- The base feature logic.config- The parameters governing the feature's behavior.
public record ConfiguredFeature<C extends FeatureConfig, F extends Feature<C>>(F extends Feature<C> feature, C extends FeatureConfig config)
extends Record
Represents a world generation feature strictly bound to its specific configuration.
This wrapper unites the stateless procedural logic of a Feature with the
data-driven parameters of a FeatureConfig, creating an executable unit
ready for placement in the world.
-
Constructor Summary
ConstructorsConstructorDescriptionConfiguredFeature(F feature, C config) Creates an instance of aConfiguredFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.feature()Returns the value of thefeaturerecord component.final inthashCode()Returns a hash code value for this object.booleanplace(WorldGenAccess level, org.bukkit.Location origin, Random random) Executes the feature's placement logic at the specified origin.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConfiguredFeature
-
-
Method Details
-
place
Executes the feature's placement logic at the specified origin.- Parameters:
level- The world generation accessor.origin- The absolute starting location for the feature.random- The deterministic random source.- Returns:
- True if the feature was successfully placed.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
feature
-
config
-