public class RandomPattern extends AbstractPattern
| Constructor and Description |
|---|
RandomPattern() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Pattern pattern,
double chance)
Add a pattern to the weight list of patterns.
|
BaseBlock |
apply(Vector position)
Return a
BaseBlock for the given position. |
public void add(Pattern pattern, double chance)
The probability for the pattern added is chance / max where max is the sum of the probabilities of all added patterns.
pattern - the patternchance - the chance, which can be any positive numberCopyright © 2010-2014. All Rights Reserved.