Record Class BlockAttachedFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.BlockAttachedFeature.Config
- Record Components:
stateProvider- The dynamic provider supplying the block to be placed.targets- The list of allowed block info targets that can be overwritten at the origin.canAttachTo- The list of block info targets that are considered valid structural support.directions- The list of block faces to check for structural support relative to the origin.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
BlockAttachedFeature
public static record BlockAttachedFeature.Config(BlockStateProvider stateProvider, List<BlockInfo> targets, List<BlockInfo> canAttachTo, List<org.bukkit.block.BlockFace> directions)
extends Record
implements FeatureConfig
Configuration record for the block attached feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockAttachedFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanAttachTorecord component.List<org.bukkit.block.BlockFace> Returns the value of thedirectionsrecord component.final 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.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
public Config(BlockStateProvider stateProvider, List<BlockInfo> targets, List<BlockInfo> canAttachTo, List<org.bukkit.block.BlockFace> directions) Creates an instance of aConfigrecord class.- Parameters:
stateProvider- the value for thestateProviderrecord componenttargets- the value for thetargetsrecord componentcanAttachTo- the value for thecanAttachTorecord componentdirections- the value for thedirectionsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-
targets
-
canAttachTo
Returns the value of thecanAttachTorecord component.- Returns:
- the value of the
canAttachTorecord component
-
directions
Returns the value of thedirectionsrecord component.- Returns:
- the value of the
directionsrecord component
-