Record Class VegetationPatchFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.VegetationPatchFeature.Config
- Record Components:
groundProvider- The block state provider defining the new ground terrain.vegetationProvider- The block state provider defining the plants scattered on top.radius- The horizontal radius of the terrain alteration patch.depth- The vertical depth to which the ground will be replaced.vegetationChance- The 1-in-X probability of placing a plant on an altered surface column.replaceableGround- The list of blocks that are allowed to be converted into the new ground.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
VegetationPatchFeature
public static record VegetationPatchFeature.Config(BlockStateProvider groundProvider, BlockStateProvider vegetationProvider, int radius, int depth, int vegetationChance, List<BlockInfo> replaceableGround)
extends Record
implements FeatureConfig
Configuration record for the vegetation patch feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<VegetationPatchFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(BlockStateProvider groundProvider, BlockStateProvider vegetationProvider, int radius, int depth, int vegetationChance, List<BlockInfo> replaceableGround) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroundProviderrecord component.final inthashCode()Returns a hash code value for this object.intradius()Returns the value of theradiusrecord component.Returns the value of thereplaceableGroundrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevegetationChancerecord component.Returns the value of thevegetationProviderrecord component.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
public Config(BlockStateProvider groundProvider, BlockStateProvider vegetationProvider, int radius, int depth, int vegetationChance, List<BlockInfo> replaceableGround) Creates an instance of aConfigrecord class.- Parameters:
groundProvider- the value for thegroundProviderrecord componentvegetationProvider- the value for thevegetationProviderrecord componentradius- the value for theradiusrecord componentdepth- the value for thedepthrecord componentvegetationChance- the value for thevegetationChancerecord componentreplaceableGround- the value for thereplaceableGroundrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
groundProvider
Returns the value of thegroundProviderrecord component.- Returns:
- the value of the
groundProviderrecord component
-
vegetationProvider
Returns the value of thevegetationProviderrecord component.- Returns:
- the value of the
vegetationProviderrecord component
-
radius
-
depth
-
vegetationChance
public int vegetationChance()Returns the value of thevegetationChancerecord component.- Returns:
- the value of the
vegetationChancerecord component
-
replaceableGround
Returns the value of thereplaceableGroundrecord component.- Returns:
- the value of the
replaceableGroundrecord component
-