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 ClassesModifier and TypeClassDescriptionstatic enumSelects the topology contract of the generated graph. -
Constructor Summary
ConstructorsConstructorDescriptionGenerationSettings(double complexity, double branching, double turnBias, double horizontalBias, GenerationSettings.Mode mode, double braidChance) Creates an instance of aGenerationSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebraidChancerecord component.doubleReturns the value of thebranchingrecord component.doubleReturns the value of thecomplexityrecord component.final booleanIndicates whether some other object is "equal to" this one.static GenerationSettingsfromComplexity(double complexity) final inthashCode()Returns a hash code value for this object.doubleReturns the value of thehorizontalBiasrecord component.mode()Returns the value of themoderecord component.final StringtoString()Returns a string representation of this record class.doubleturnBias()Returns the value of theturnBiasrecord component.
-
Constructor Details
-
GenerationSettings
public GenerationSettings(double complexity, double branching, double turnBias, double horizontalBias, GenerationSettings.Mode mode, double braidChance) Creates an instance of aGenerationSettingsrecord class.- Parameters:
complexity- the value for thecomplexityrecord componentbranching- the value for thebranchingrecord componentturnBias- the value for theturnBiasrecord componenthorizontalBias- the value for thehorizontalBiasrecord componentmode- the value for themoderecord componentbraidChance- the value for thebraidChancerecord component
-
-
Method Details
-
fromComplexity
-
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. -
complexity
public double complexity()Returns the value of thecomplexityrecord component.- Returns:
- the value of the
complexityrecord component
-
branching
public double branching()Returns the value of thebranchingrecord component.- Returns:
- the value of the
branchingrecord component
-
turnBias
public double turnBias()Returns the value of theturnBiasrecord component.- Returns:
- the value of the
turnBiasrecord component
-
horizontalBias
public double horizontalBias()Returns the value of thehorizontalBiasrecord component.- Returns:
- the value of the
horizontalBiasrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
braidChance
public double braidChance()Returns the value of thebraidChancerecord component.- Returns:
- the value of the
braidChancerecord component
-