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

    Fields
    Modifier and Type
    Field
    Description
    The codec for serializing and deserializing the structure configuration.

    Fields inherited from interface FeatureConfig

    NONE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Config(String structureId, boolean randomRotation, org.bukkit.block.structure.StructureRotation rotation, boolean randomMirror, org.bukkit.block.structure.Mirror mirror)
    Creates an instance of a Config record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.bukkit.block.structure.Mirror
    Returns the value of the mirror record component.
    boolean
    Returns the value of the randomMirror record component.
    boolean
    Returns the value of the randomRotation record component.
    org.bukkit.block.structure.StructureRotation
    Returns the value of the rotation record component.
    Returns the value of the structureId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • 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 a Config record class.
      Parameters:
      structureId - the value for the structureId record component
      randomRotation - the value for the randomRotation record component
      rotation - the value for the rotation record component
      randomMirror - the value for the randomMirror record component
      mirror - the value for the mirror record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • structureId

      public String structureId()
      Returns the value of the structureId record component.
      Returns:
      the value of the structureId record component
    • randomRotation

      public boolean randomRotation()
      Returns the value of the randomRotation record component.
      Returns:
      the value of the randomRotation record component
    • rotation

      public org.bukkit.block.structure.StructureRotation rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component
    • randomMirror

      public boolean randomMirror()
      Returns the value of the randomMirror record component.
      Returns:
      the value of the randomMirror record component
    • mirror

      public org.bukkit.block.structure.Mirror mirror()
      Returns the value of the mirror record component.
      Returns:
      the value of the mirror record component