public class PopulatorObjects extends Object
PopulatorObject
as a Populator
. These
methods follow the rules for populators as outlined by
Populator.populate(Chunk, Random)
.Constructor and Description |
---|
PopulatorObjects() |
Modifier and Type | Method and Description |
---|---|
static Populator |
spawnAtRandomHeight(PopulatorObject object,
int attemptsPerChunk,
double chancePerAttempt,
int minY,
int maxY)
Creates a populator that spawns the given object at a random y location.
|
public static Populator spawnAtRandomHeight(PopulatorObject object, int attemptsPerChunk, double chancePerAttempt, int minY, int maxY)
object
- The object to spawn.attemptsPerChunk
- How many times an attempt should be made to place
this object in a chunk.chancePerAttempt
- The chance that each attempt succeeds, between 0
and 1, inclusive.minY
- The minimum y location, inclusive.maxY
- The maximum y location, inclusive.