mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
merge 1.16
This commit is contained in:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user