Record Class PresetSnapshot

java.lang.Object
java.lang.Record
dev.despical.mazeengine.api.model.PresetSnapshot
Record Components:
id - the configured preset identifier
displayName - the player-facing theme name
description - the theme description
accent - the theme color in #RRGGBB form
difficulty - the author-assigned challenge label
geometry - the structural dimensions in blocks
roof - whether the preset generates a ceiling
snapshotRequested - whether creation should capture original terrain
algorithm - the graph topology mode
complexity - the generation bias in 0..1

public record PresetSnapshot(String id, String displayName, String description, String accent, PresetSnapshot.Difficulty difficulty, MazeGeometry geometry, boolean roof, boolean snapshotRequested, PresetSnapshot.Algorithm algorithm, double complexity) extends Record
Captures public metadata for a configured or saved maze preset.

The preset registry returns current configuration. A maze snapshot contains the frozen metadata saved with that maze, so later configuration reloads do not change its generation settings or description.

This value exposes display metadata, structural dimensions, and high-level generation settings. It does not expose mutable Bukkit objects, block palettes, decoration rules, or internal advanced generation parameters. It is suitable for menus, descriptions, and comparison of saved settings.

  • Constructor Details

    • PresetSnapshot

      public PresetSnapshot(String id, String displayName, String description, String accent, PresetSnapshot.Difficulty difficulty, MazeGeometry geometry, boolean roof, boolean snapshotRequested, PresetSnapshot.Algorithm algorithm, double complexity)
      Creates an instance of a PresetSnapshot record class.
      Parameters:
      id - the value for the id record component
      displayName - the value for the displayName record component
      description - the value for the description record component
      accent - the value for the accent record component
      difficulty - the value for the difficulty record component
      geometry - the value for the geometry record component
      roof - the value for the roof record component
      snapshotRequested - the value for the snapshotRequested record component
      algorithm - the value for the algorithm record component
      complexity - the value for the complexity 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • accent

      public String accent()
      Returns the value of the accent record component.
      Returns:
      the value of the accent record component
    • difficulty

      public PresetSnapshot.Difficulty difficulty()
      Returns the value of the difficulty record component.
      Returns:
      the value of the difficulty record component
    • geometry

      public MazeGeometry geometry()
      Returns the value of the geometry record component.
      Returns:
      the value of the geometry record component
    • roof

      public boolean roof()
      Returns the value of the roof record component.
      Returns:
      the value of the roof record component
    • snapshotRequested

      public boolean snapshotRequested()
      Returns the value of the snapshotRequested record component.
      Returns:
      the value of the snapshotRequested record component
    • algorithm

      public PresetSnapshot.Algorithm algorithm()
      Returns the value of the algorithm record component.
      Returns:
      the value of the algorithm record component
    • complexity

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