Record Class RandomFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.RandomFeature.Config
- Record Components:
features- The list of probability-gated features to evaluate.defaultFeature- The fallback feature executed if all primary features fail.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
RandomFeature
public static record RandomFeature.Config(List<RandomFeature.WeightedFeature> features, PlacedFeature defaultFeature)
extends Record
implements FeatureConfig
Configuration record for the random feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<RandomFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(List<RandomFeature.WeightedFeature> features, PlacedFeature defaultFeature) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultFeaturerecord component.final booleanIndicates whether some other object is "equal to" this one.features()Returns the value of thefeaturesrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
Creates an instance of aConfigrecord class.- Parameters:
features- the value for thefeaturesrecord componentdefaultFeature- the value for thedefaultFeaturerecord component
-
-
Method Details
-
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). -
features
-
defaultFeature
Returns the value of thedefaultFeaturerecord component.- Returns:
- the value of the
defaultFeaturerecord component
-