Class Preset

java.lang.Object
dev.despical.mazeengine.config.Preset

public final class Preset extends Object
Describes the complete theme and generation settings retained by a maze.

A preset combines corridor and wall dimensions, roof and snapshot flags, occupied-block policy, graph-generation controls, palettes, and decoration rules. Display metadata supplies the theme name, description, accent color, and author-assigned difficulty shown in chat panels.

Configured presets are read through PresetCodec and copied into saved maze records. Existing mazes therefore keep their original geometry and theme after configuration reloads. Serialization stores those frozen settings together with the saved graph for regeneration and recovery.

  • Method Details

    • builder

      public static Preset.Builder builder(String name)
      Starts a named preset whose settings can be supplied without positional arguments.

      Palette values must be supplied before building. Optional geometry and decoration settings use the same neutral defaults as the configuration reader; theme-specific display metadata and difficulty belong in the preset's YAML configuration.

      Parameters:
      name - the persistent preset identifier
      Returns:
      a new independently mutable builder
    • capitalized

      public static String capitalized(String name)
    • height

      public int height()
    • read

      public static Preset read(String name, org.bukkit.configuration.ConfigurationSection config)
    • serialize

      public Map<String,Object> serialize()
    • fromMap

      public static Preset fromMap(String name, Map<String,Object> map)
    • name

      public String name()
    • pathWidth

      public int pathWidth()
    • wallThickness

      public int wallThickness()
    • wallHeight

      public int wallHeight()
    • roof

      public boolean roof()
    • snapshot

      public boolean snapshot()
    • placement

      public Preset.Placement placement()
    • generation

      public GenerationSettings generation()
    • floor

      public Palette floor()
    • wall

      public Palette wall()
    • ceiling

      public Palette ceiling()
    • cap

      public Palette cap()
    • capChance

      public double capChance()
    • lightSpacing

      public int lightSpacing()
    • light

      public String light()
    • entranceMarker

      public String entranceMarker()
    • exitMarker

      public String exitMarker()
    • displayName

      public String displayName()
    • description

      public String description()
    • accent

      public String accent()
    • difficulty

      public Preset.Difficulty difficulty()
    • wallInlay

      public Palette wallInlay()
    • inlayChance

      public double inlayChance()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object