@ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public final class CubicPopulatorList extends java.lang.Object implements ICubicPopulator
| Constructor and Description |
|---|
CubicPopulatorList() |
CubicPopulatorList(java.util.List<ICubicPopulator> populators) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ICubicPopulator populator) |
void |
generate(net.minecraft.world.World world,
java.util.Random random,
CubePos pos,
net.minecraft.world.biome.Biome biome)
Generate a specific populator feature for a given cube given a biome.
|
void |
makeImmutable() |
public CubicPopulatorList(java.util.List<ICubicPopulator> populators)
public CubicPopulatorList()
public void add(ICubicPopulator populator)
public void makeImmutable()
public void generate(net.minecraft.world.World world,
java.util.Random random,
CubePos pos,
net.minecraft.world.biome.Biome biome)
ICubicPopulatorint x = random.nextInt(16) + 8 + pos.getXCenter();
You can also use CubePos.randomPopulationPos(java.util.Random) to generate random position in population space.
All block access should be done through the provided ICubicWorld instance.generate in interface ICubicPopulatorworld - The ICubicWorld we're generating for. Casting it to World is always safe.random - the cube specific Random.pos - is the position of the cube being populated BlockPos.biome - The biome the populator is working in.