merge 1.16

This commit is contained in:
Aurora
2020-07-01 14:46:25 +02:00
86 changed files with 2816 additions and 741 deletions

View File

@ -52,6 +52,19 @@ public class RandomPattern extends AbstractPattern {
this.random = random;
}
/**
* Create a random pattern from an existing one but with a different random.
*
* @param random the new random to use.
* @param parent the existing random pattern.
*/
public RandomPattern(SimpleRandom random, RandomPattern parent) {
this.random = random;
this.weights = parent.weights;
this.collection = RandomCollection.of(weights, random);
this.patterns = parent.patterns;
}
/**
* Add a pattern to the weight list of patterns.
*