Record Class OreFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.OreFeature.Config
- Record Components:
targets- A list of target rules defining what to replace and with what.size- The relative size and volume bounds of the ore vein.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
OreFeature
public static record OreFeature.Config(List<OreFeature.Target> targets, int size)
extends Record
implements FeatureConfig
Configuration record for the ore feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<OreFeature.Config> The codec for serializing and deserializing the configuration.Fields inherited from interface com.github.darksoulq.abyssallib.world.gen.feature.FeatureConfig
NONE -
Constructor Summary
ConstructorsConstructorDescriptionConfig(List<OreFeature.Target> targets, int size) 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.intsize()Returns the value of thesizerecord 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
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
targets
Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-