QtCraft API C++ classes QML types Handbook

QcVegetationSpread Class

What bone meal grows on a block that growsVegetation (a grass block, decision E-814), as in the reference: attempts tries each walk from the cell above it up to attempt / 16 random steps (one block sideways, sometimes one up or down) over cells whose block below also grows vegetation and that are not solid; a try ending in air plants a flower of the biome there with one chance in flowerOdds (if the biome has flowers), otherwise its grass. More...

Header: #include <server/plants/QcVegetationSpread.h>

Public Functions

QList<QcPlacedBlock> spread(const QcServerWorld &world, QcBlockPos target, QRandomGenerator &random) const

Static Public Members

const int attempts
const int attemptsPerStep
const int flowerOdds

Detailed Description

The biome is the generator's at the end of the walk, the terrain's vegetationBiome where the generator names none.

Member Function Documentation

QList<QcPlacedBlock> QcVegetationSpread::spread(const QcServerWorld &world, QcBlockPos target, QRandomGenerator &random) const

Returns the plants bone meal on target of world grows, drawn from random, each cell at most once; the world is not changed.