Record Class StructureFeature.Config
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.gen.feature.impl.StructureFeature.Config
- Record Components:
structureId- The namespaced registry key of the target structure.randomRotation- Flag to randomize rotation completely, overriding the configured rotation.rotation- The explicitly defined structural rotation.randomMirror- Flag to randomize the mirroring completely, overriding the configured mirror.mirror- The explicitly defined structural mirror.
- All Implemented Interfaces:
FeatureConfig
- Enclosing class:
StructureFeature
public static record StructureFeature.Config(String structureId, boolean randomRotation, org.bukkit.block.structure.StructureRotation rotation, boolean randomMirror, org.bukkit.block.structure.Mirror mirror)
extends Record
implements FeatureConfig
Configuration record for the structure feature.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<StructureFeature.Config> The codec for serializing and deserializing the structure configuration.Fields inherited from interface FeatureConfig
NONE -
Constructor Summary
Constructors -
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.org.bukkit.block.structure.Mirrormirror()Returns the value of themirrorrecord component.booleanReturns the value of therandomMirrorrecord component.booleanReturns the value of therandomRotationrecord component.org.bukkit.block.structure.StructureRotationrotation()Returns the value of therotationrecord component.Returns the value of thestructureIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
The codec for serializing and deserializing the structure configuration.
-
-
Constructor Details
-
Config
public Config(String structureId, boolean randomRotation, org.bukkit.block.structure.StructureRotation rotation, boolean randomMirror, org.bukkit.block.structure.Mirror mirror) Creates an instance of aConfigrecord class.- Parameters:
structureId- the value for thestructureIdrecord componentrandomRotation- the value for therandomRotationrecord componentrotation- the value for therotationrecord componentrandomMirror- the value for therandomMirrorrecord componentmirror- the value for themirrorrecord 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. -
structureId
Returns the value of thestructureIdrecord component.- Returns:
- the value of the
structureIdrecord component
-
randomRotation
public boolean randomRotation()Returns the value of therandomRotationrecord component.- Returns:
- the value of the
randomRotationrecord component
-
rotation
-
randomMirror
public boolean randomMirror()Returns the value of therandomMirrorrecord component.- Returns:
- the value of the
randomMirrorrecord component
-
mirror
-