Record Class MazeGeometry

java.lang.Object
java.lang.Record
dev.despical.mazeengine.api.model.MazeGeometry
Record Components:
pathWidth - the corridor width, from 1 through 16 blocks
wallThickness - the wall thickness, from 1 through 8 blocks
wallHeight - the wall height, from 2 through 64 blocks

public record MazeGeometry(int pathWidth, int wallThickness, int wallHeight) extends Record
Describes structural maze dimensions in Minecraft blocks.

Path width is the usable corridor width; wall thickness separates adjacent cells. Wall height counts the vertical wall blocks above the floor and excludes both the floor and an optional roof layer.

This value validates the supported structural ranges. The final block volume depends on the logical grid and is checked against server limits at submission.

  • Constructor Summary

    Constructors
    Constructor
    Description
    MazeGeometry(int pathWidth, int wallThickness, int wallHeight)
    Constructs a complete set of supported structural dimensions.
  • 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.
    int
    Returns the value of the pathWidth record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the wallHeight record component.
    int
    Returns the value of the wallThickness record component.

    Methods inherited from class Object

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

    • MazeGeometry

      public MazeGeometry(int pathWidth, int wallThickness, int wallHeight)
      Constructs a complete set of supported structural dimensions.

      All three settings are supplied together. A creation-request override replaces the corresponding preset dimensions as one geometry value.

      Parameters:
      pathWidth - the corridor width in blocks
      wallThickness - the wall thickness in blocks
      wallHeight - the wall height excluding floor and roof
      Throws:
      IllegalArgumentException - if path width is outside 1..16, wall thickness is outside 1..8, or wall height is outside 2..64
  • 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. All components in this record class 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.
    • pathWidth

      public int pathWidth()
      Returns the value of the pathWidth record component.
      Returns:
      the value of the pathWidth record component
    • wallThickness

      public int wallThickness()
      Returns the value of the wallThickness record component.
      Returns:
      the value of the wallThickness record component
    • wallHeight

      public int wallHeight()
      Returns the value of the wallHeight record component.
      Returns:
      the value of the wallHeight record component