Record Class PillarFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.PillarFeature.Config
- Record Components:
minHeight- The minimum guaranteed block length of the pillar.maxHeight- The maximum possible block length of the pillar.upward- True to generate upwards from the origin, false to generate downwards.stopOnInvalid- True to abort the rest of the pillar if an invalid target is hit.stateProvider- The dynamic provider supplying the blocks to build the pillar.targets- The list of allowed target block identifiers that can be overwritten.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
PillarFeature
public static record PillarFeature.Config(int minHeight, int maxHeight, boolean upward, boolean stopOnInvalid, BlockStateProvider stateProvider, List<BlockInfo> targets)
extends Record
implements FeatureConfig
Configuration record for the pillar feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<PillarFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(int minHeight, int maxHeight, boolean upward, boolean stopOnInvalid, 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.intReturns the value of themaxHeightrecord component.intReturns the value of theminHeightrecord component.Returns the value of thestateProviderrecord component.booleanReturns the value of thestopOnInvalidrecord component.targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.booleanupward()Returns the value of theupwardrecord component.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
public Config(int minHeight, int maxHeight, boolean upward, boolean stopOnInvalid, BlockStateProvider stateProvider, List<BlockInfo> targets) Creates an instance of aConfigrecord class.- Parameters:
minHeight- the value for theminHeightrecord componentmaxHeight- the value for themaxHeightrecord componentupward- the value for theupwardrecord componentstopOnInvalid- the value for thestopOnInvalidrecord 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. -
minHeight
-
maxHeight
-
upward
-
stopOnInvalid
public boolean stopOnInvalid()Returns the value of thestopOnInvalidrecord component.- Returns:
- the value of the
stopOnInvalidrecord component
-
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-
targets
-