Record Class WaterloggedVegetationFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.WaterloggedVegetationFeature.Config
- Record Components:
tries- The total number of placement attempts within the scatter radius.xzSpread- The maximum horizontal offset from the origin on the X and Z axes.ySpread- The maximum vertical offset from the origin on the Y axis.stateProvider- The dynamic provider supplying the aquatic plants to be scattered.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
WaterloggedVegetationFeature
public static record WaterloggedVegetationFeature.Config(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider)
extends Record
implements FeatureConfig
Configuration record for the waterlogged vegetation feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<WaterloggedVegetationFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface com.github.darksoulq.abyssallib.world.gen.feature.FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestateProviderrecord component.final StringtoString()Returns a string representation of this record class.inttries()Returns the value of thetriesrecord component.intxzSpread()Returns the value of thexzSpreadrecord component.intySpread()Returns the value of theySpreadrecord component.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
Creates an instance of aConfigrecord class.- Parameters:
tries- the value for thetriesrecord componentxzSpread- the value for thexzSpreadrecord componentySpread- the value for theySpreadrecord componentstateProvider- the value for thestateProviderrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
tries
public int tries()Returns the value of thetriesrecord component.- Returns:
- the value of the
triesrecord component
-
xzSpread
public int xzSpread()Returns the value of thexzSpreadrecord component.- Returns:
- the value of the
xzSpreadrecord component
-
ySpread
public int ySpread()Returns the value of theySpreadrecord component.- Returns:
- the value of the
ySpreadrecord component
-
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-