Record Class FossilFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.FossilFeature.Config
- Record Components:
stateProvider- The dynamic provider supplying the block used to build the fossil.targets- The list of allowed target block identifiers that can be overwritten.radius- The bounding radius for the 3D noise evaluation.noiseFrequency- The multiplier applied to coordinates before sampling the noise field.noiseThreshold- The breakpoint value that the 3D noise must exceed to place a block.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
FossilFeature
public static record FossilFeature.Config(BlockStateProvider stateProvider, List<BlockInfo> targets, int radius, double noiseFrequency, double noiseThreshold)
extends Record
implements FeatureConfig
Configuration record for the fossil feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<FossilFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(BlockStateProvider stateProvider, List<BlockInfo> targets, int radius, double noiseFrequency, double noiseThreshold) 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.doubleReturns the value of thenoiseFrequencyrecord component.doubleReturns the value of thenoiseThresholdrecord component.intradius()Returns the value of theradiusrecord component.Returns the value of thestateProviderrecord component.targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
public Config(BlockStateProvider stateProvider, List<BlockInfo> targets, int radius, double noiseFrequency, double noiseThreshold) Creates an instance of aConfigrecord class.- Parameters:
stateProvider- the value for thestateProviderrecord componenttargets- the value for thetargetsrecord componentradius- the value for theradiusrecord componentnoiseFrequency- the value for thenoiseFrequencyrecord componentnoiseThreshold- the value for thenoiseThresholdrecord 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. -
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-
targets
-
radius
-
noiseFrequency
public double noiseFrequency()Returns the value of thenoiseFrequencyrecord component.- Returns:
- the value of the
noiseFrequencyrecord component
-
noiseThreshold
public double noiseThreshold()Returns the value of thenoiseThresholdrecord component.- Returns:
- the value of the
noiseThresholdrecord component
-