Class RandomSpreadPlacement.Builder
java.lang.Object
dev.wyck.worldgen.structure.placement.RandomSpreadPlacement.Builder
- Enclosing interface:
RandomSpreadPlacement
Builder for
RandomSpreadPlacement.- Since:
- 3.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the random-spread placement.exclusionZone(StructurePlacement.ExclusionZone exclusionZone) Sets the zone around another structure set this placement avoids.frequency(float frequency) Sets the fraction of eligible chunks that receive the structure.frequencyReduction(FrequencyReduction frequencyReduction) Sets the reducer applied to the frequency.locateOffset(BlockVector locateOffset) Sets the offset applied to a located position.salt(int salt) Sets the salt mixed into the placement's random seed.separation(int separation) Sets the minimum distance, in chunks, between two structures of this set.spacing(int spacing) Sets the side length, in chunks, of the cell one structure is placed in.spreadType(RandomSpreadType spreadType) Sets how the candidate position is distributed inside its cell.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
spacing
Sets the side length, in chunks, of the cell one structure is placed in.- Parameters:
spacing- the placement spacing- Returns:
- this builder
- Since:
- 3.4.0
-
separation
Sets the minimum distance, in chunks, between two structures of this set.- Parameters:
separation- the placement separation- Returns:
- this builder
- Since:
- 3.4.0
-
spreadType
Sets how the candidate position is distributed inside its cell.- Parameters:
spreadType- the spread type- Returns:
- this builder
- Since:
- 3.4.0
-
salt
Sets the salt mixed into the placement's random seed.- Parameters:
salt- the placement salt- Returns:
- this builder
- Since:
- 3.4.0
-
locateOffset
Sets the offset applied to a located position.- Parameters:
locateOffset- the locate offset- Returns:
- this builder
- Since:
- 3.4.0
-
frequencyReduction
@AsOf("3.4.0") public RandomSpreadPlacement.Builder frequencyReduction(FrequencyReduction frequencyReduction) Sets the reducer applied to the frequency.- Parameters:
frequencyReduction- the frequency reduction method- Returns:
- this builder
- Since:
- 3.4.0
-
frequency
Sets the fraction of eligible chunks that receive the structure.- Parameters:
frequency- the placement frequency- Returns:
- this builder
- Since:
- 3.4.0
-
exclusionZone
@AsOf("3.4.0") public RandomSpreadPlacement.Builder exclusionZone(StructurePlacement.ExclusionZone exclusionZone) Sets the zone around another structure set this placement avoids.- Parameters:
exclusionZone- the exclusion zone- Returns:
- this builder
- Since:
- 3.4.0
-
build
Builds the random-spread placement.- Returns:
- the random-spread placement
- Since:
- 3.4.0
-