Record Class BlockPatchFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.BlockPatchFeature.Config
- Record Components:
tries- The total number of placement attempts within the patch 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 blocks to be scattered.targets- The list of allowed target block identifiers that can be overwritten.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
BlockPatchFeature
public static record BlockPatchFeature.Config(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider, List<BlockInfo> targets)
extends Record
implements FeatureConfig
Configuration record for the block patch feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockPatchFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider, List<BlockInfo> targets) 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.targets()Returns the value of thetargetsrecord 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
public Config(int tries, int xzSpread, int ySpread, BlockStateProvider stateProvider, List<BlockInfo> targets) 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 componenttargets- the value for thetargetsrecord 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. -
tries
-
xzSpread
-
ySpread
-
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-
targets
-