Record Class PresetSnapshot
java.lang.Object
java.lang.Record
dev.despical.mazeengine.api.model.PresetSnapshot
- Record Components:
id- the configured preset identifierdisplayName- the player-facing theme namedescription- the theme descriptionaccent- the theme color in#RRGGBBformdifficulty- the author-assigned challenge labelgeometry- the structural dimensions in blocksroof- whether the preset generates a ceilingsnapshotRequested- whether creation should capture original terrainalgorithm- the graph topology modecomplexity- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes how the generator connects the logical cell graph.static enumProvides the challenge label assigned by the preset author. -
Constructor Summary
ConstructorsConstructorDescriptionPresetSnapshot(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 aPresetSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccent()Returns the value of theaccentrecord component.Returns the value of thealgorithmrecord component.doubleReturns the value of thecomplexityrecord component.Returns the value of thedescriptionrecord component.Returns the value of thedifficultyrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.geometry()Returns the value of thegeometryrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanroof()Returns the value of theroofrecord component.booleanReturns the value of thesnapshotRequestedrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aPresetSnapshotrecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componentdescription- the value for thedescriptionrecord componentaccent- the value for theaccentrecord componentdifficulty- the value for thedifficultyrecord componentgeometry- the value for thegeometryrecord componentroof- the value for theroofrecord componentsnapshotRequested- the value for thesnapshotRequestedrecord componentalgorithm- the value for thealgorithmrecord componentcomplexity- the value for thecomplexityrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
accent
-
difficulty
Returns the value of thedifficultyrecord component.- Returns:
- the value of the
difficultyrecord component
-
geometry
-
roof
-
snapshotRequested
public boolean snapshotRequested()Returns the value of thesnapshotRequestedrecord component.- Returns:
- the value of the
snapshotRequestedrecord component
-
algorithm
-
complexity
public double complexity()Returns the value of thecomplexityrecord component.- Returns:
- the value of the
complexityrecord component
-