Record Class RandomFeatureConfiguration.WeightedPlacedFeature
java.lang.Object
java.lang.Record
dev.wyck.worldgen.feature.configurations.RandomFeatureConfiguration.WeightedPlacedFeature
- Record Components:
feature- the placed featurechance- the chance of the feature being placed (between 0.0 and 1.0)
- Enclosing interface:
RandomFeatureConfiguration
@AsOf("3.0.0")
public static record RandomFeatureConfiguration.WeightedPlacedFeature(PlacedFeature feature, float chance)
extends Record
A weighted placed feature, which consists of a placed feature and a chance of being placed.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedPlacedFeature(PlacedFeature feature, float chance) Creates an instance of aWeightedPlacedFeaturerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatchance()Returns the value of thechancerecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
feature
-
chance
-