Record Class GenerationSettings

java.lang.Object
java.lang.Record
dev.despical.mazeengine.core.GenerationSettings

public record GenerationSettings(double complexity, double branching, double turnBias, double horizontalBias, GenerationSettings.Mode mode, double braidChance) extends Record
Controls topology generation independently of Bukkit worlds and block palettes.

Branching selects how the active frontier is explored, turn bias affects continuation versus turning, and horizontal bias weights X/Z movement. Complexity supplies the high-level value from which standard biases can be derived; it is not a measured player-difficulty score.

Every probability must be finite and within 0..1. PERFECT mode prohibits braiding, while BRAIDED mode can connect dead ends according to braidChance. The immutable value is safe to pass to worker-thread generation together with a fixed seed and grid dimensions.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Selects the topology contract of the generated graph.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GenerationSettings(double complexity, double branching, double turnBias, double horizontalBias, GenerationSettings.Mode mode, double braidChance)
    Creates an instance of a GenerationSettings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the braidChance record component.
    double
    Returns the value of the branching record component.
    double
    Returns the value of the complexity record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    fromComplexity(double complexity)
     
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the horizontalBias record component.
    Returns the value of the mode record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the turnBias record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GenerationSettings

      public GenerationSettings(double complexity, double branching, double turnBias, double horizontalBias, GenerationSettings.Mode mode, double braidChance)
      Creates an instance of a GenerationSettings record class.
      Parameters:
      complexity - the value for the complexity record component
      branching - the value for the branching record component
      turnBias - the value for the turnBias record component
      horizontalBias - the value for the horizontalBias record component
      mode - the value for the mode record component
      braidChance - the value for the braidChance record component
  • Method Details

    • fromComplexity

      public static GenerationSettings fromComplexity(double complexity)
    • 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.
    • complexity

      public double complexity()
      Returns the value of the complexity record component.
      Returns:
      the value of the complexity record component
    • branching

      public double branching()
      Returns the value of the branching record component.
      Returns:
      the value of the branching record component
    • turnBias

      public double turnBias()
      Returns the value of the turnBias record component.
      Returns:
      the value of the turnBias record component
    • horizontalBias

      public double horizontalBias()
      Returns the value of the horizontalBias record component.
      Returns:
      the value of the horizontalBias record component
    • mode

      public GenerationSettings.Mode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • braidChance

      public double braidChance()
      Returns the value of the braidChance record component.
      Returns:
      the value of the braidChance record component