Record Class DiskFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.DiskFeature.Config
- Record Components:
stateProvider- The dynamic provider supplying the blocks for the disk.radius- The horizontal radius of the disk.halfHeight- The vertical thickness offset applied above and below the origin Y.targets- The list of allowed block info targets that the disk can replace.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
DiskFeature
public static record DiskFeature.Config(BlockStateProvider stateProvider, int radius, int halfHeight, List<BlockInfo> targets)
extends Record
implements FeatureConfig
Configuration record for the disk feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<DiskFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(BlockStateProvider stateProvider, int radius, int halfHeight, List<BlockInfo> targets) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thehalfHeightrecord component.final inthashCode()Returns a hash code value for this object.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, int radius, int halfHeight, List<BlockInfo> targets) Creates an instance of aConfigrecord class.- Parameters:
stateProvider- the value for thestateProviderrecord componentradius- the value for theradiusrecord componenthalfHeight- the value for thehalfHeightrecord 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. -
stateProvider
Returns the value of thestateProviderrecord component.- Returns:
- the value of the
stateProviderrecord component
-
radius
-
halfHeight
public int halfHeight()Returns the value of thehalfHeightrecord component.- Returns:
- the value of the
halfHeightrecord component
-
targets
-