Record Class SpringFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.SpringFeature.Config
- Record Components:
stateProvider- The dynamic block provider representing the core liquid to place.rock- The list of target blocks considered valid encasing materials.requiresBlockBelow- Flag dictating if the block directly beneath the origin must be rock.holeCount- The exact number of adjacent blocks that must be air for placement.validNeighbors- The exact number of adjacent blocks that must be rock for placement.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
SpringFeature
public static record SpringFeature.Config(BlockStateProvider stateProvider, List<BlockInfo> rock, boolean requiresBlockBelow, int holeCount, int validNeighbors)
extends Record
implements FeatureConfig
Configuration record for the spring feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<SpringFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(BlockStateProvider stateProvider, List<BlockInfo> rock, boolean requiresBlockBelow, int holeCount, int validNeighbors) 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 theholeCountrecord component.booleanReturns the value of therequiresBlockBelowrecord component.rock()Returns the value of therockrecord component.Returns the value of thestateProviderrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevalidNeighborsrecord component.
-
Field Details
-
CODEC
The codec for serializing and deserializing the configuration.
-
-
Constructor Details
-
Config
public Config(BlockStateProvider stateProvider, List<BlockInfo> rock, boolean requiresBlockBelow, int holeCount, int validNeighbors) Creates an instance of aConfigrecord class.- Parameters:
stateProvider- the value for thestateProviderrecord componentrock- the value for therockrecord componentrequiresBlockBelow- the value for therequiresBlockBelowrecord componentholeCount- the value for theholeCountrecord componentvalidNeighbors- the value for thevalidNeighborsrecord 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
-
rock
-
requiresBlockBelow
public boolean requiresBlockBelow()Returns the value of therequiresBlockBelowrecord component.- Returns:
- the value of the
requiresBlockBelowrecord component
-
holeCount
-
validNeighbors
public int validNeighbors()Returns the value of thevalidNeighborsrecord component.- Returns:
- the value of the
validNeighborsrecord component
-