Class CreateMazeRequest.Builder
- Enclosing class:
CreateMazeRequest
Each call updates this builder and returns it for chaining. A builder can be reused, but it is mutable and must not be shared between threads. Requests already built are independent of subsequent builder changes.
For example:
CreateMazeRequest request = CreateMazeRequest.builder("arena", origin, cells)
.preset("default")
.seed(742L)
.roof(false)
.build();
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Constructs an independent immutable request from the current values.complexity(double value) Overrides complexity and derives the generation biases from it.geometry(MazeGeometry value) Overrides all structural dimensions together.Overrides the occupied-block preflight policy.Selects the configured preset used to resolve the request.roof(boolean value) Overrides the preset's ceiling setting.seed(long value) Uses an explicit deterministic generation seed.snapshot(boolean value) Overrides the preset's original terrain capture setting.
-
Method Details
-
preset
Selects the configured preset used to resolve the request.The identifier is normalized and validated when
build()is called. Its existence is checked when creation is submitted.- Parameters:
value- the configured preset identifier- Returns:
- this builder using the supplied preset
-
seed
Uses an explicit deterministic generation seed.Zero and negative seeds are valid. Omit this call to generate a seed when the request is submitted.
- Parameters:
value- the seed to use for topology generation- Returns:
- this builder with the explicit seed
-
geometry
Overrides all structural dimensions together.The geometry controls corridor width, wall thickness, and wall height. Server volume limits are still checked at submission.
- Parameters:
value- the complete geometry override- Returns:
- this builder with the supplied geometry
- Throws:
NullPointerException- ifvalueis null
-
complexity
Overrides complexity and derives the generation biases from it.The value must be finite and within 0..1 inclusive. Validation occurs when
build()constructs the request.- Parameters:
value- the requested complexity in 0..1- Returns:
- this builder with the supplied complexity
-
roof
Overrides the preset's ceiling setting.Passing false explicitly disables the roof even if the preset enables it. Omitting this call inherits the preset setting.
- Parameters:
value- whether the maze should have a ceiling- Returns:
- this builder with the explicit ceiling setting
-
snapshot
Overrides the preset's original terrain capture setting.Passing true requires WorldEdit or FAWE at submission. Passing false explicitly disables capture rather than inheriting the preset.
- Parameters:
value- whether original terrain should be captured- Returns:
- this builder with the explicit capture setting
-
placement
Overrides the occupied-block preflight policy.The selected policy controls which existing blocks are accepted before world work starts. It does not change the finished maze structure.
- Parameters:
value- the occupied-block handling policy- Returns:
- this builder with the supplied policy
- Throws:
NullPointerException- ifvalueis null
-
build
Constructs an independent immutable request from the current values.This validates the identifier, required fields, and optional complexity. World availability, permissions, presets, and configured server limits are checked when the request is submitted to the operation service.
- Returns:
- a new creation request containing the builder's current values
- Throws:
NullPointerException- if the preset identifier is nullIllegalArgumentException- if the preset identifier or complexity is invalid
-