Populators
Populators are the block rules under populators: in a season file. They put blocks such as snow, flowers or leaf litter on the ground, or swap the surface block (water to ice), in the chunks sent to players. Only players see these blocks: the server keeps its real blocks, which other plugins see, and nothing is saved.
Each key under populators is one rule, named by the key. A rule needs block or block-pool to place anything.
- A value the plugin cannot use logs a warning naming the season file, the rule and the option, and in most cases skips the rule.
/ms reloadreads the rules again, but chunks players already have keep their blocks until they are sent again, see Chunk refresh.
When rules run
A chunk gets the rules of a season when it is sent to a player and all of these hold:
- the world is in that season, or the chunk lies in a WorldGuard region whose
permanent-seasonflag names it; modify-biome-on-clientistrueinconfig.yml;- the player has not turned season colours off with
/toggleseasoncolors; - no land plugin has switched season effects off there, see Land Claims.
Rules are stored per biome-color-index, so two seasons with the same index share one set. Block replacements run on the chunk first.
Rules work on the surface of each column: the highest block that is not air, leaves, a snow layer or moss carpet. They are tried from the lowest priority up.
A plant standing on the ground is itself the surface, so a rule with scan-for: [GRASS_BLOCK] skips a column with short grass or a flower on top, and require-snowable rejects the plant.
What to place
| Option | Default | What it does |
|---|---|---|
enabled |
true |
false skips the rule when the file is read, so the seasonpopulator mechanic cannot turn it on later. |
priority |
10 |
Order of the rules on a column, lowest first, file order for equal numbers. A whole number. |
mode |
PLACE_ABOVE |
PLACE_ABOVE puts the block in the air above the surface, REPLACE_IN_PLACE replaces the surface block. |
block |
none | The block to place, a Bukkit material name (not case-sensitive). An unknown name logs Unknown material in populator rule '<rule>': <block> and skips the rule. |
block-pool |
none | A list of material and weight entries, one picked per placement by weight. Wins over block. |
block-variants |
0 |
From 2 up, each column gets one of that many states of the block, as for LEAF_LITTER. It does nothing on a block without properties or on snow with layers. |
stop-after-place |
true |
Ends the column once this rule placed a block. With false later rules still run and can replace it. |
- A pool entry without
material, or with aweightthat is not a number (default 1), skips the whole rule. An unknown material is left out of the pool withUnknown material in populator pool '<rule>': <material>. When no entry is left, the rule usesblock, or places nothing without one. - A
REPLACE_IN_PLACErule withoutscan-forreplaces the surface of every column that passes its other checks.
Snow layers
layers sets how many snow layers a SNOW rule places in a column: a whole number, or a formula in quotes worked out per column. Formulas take numbers, +, -, *, /, parentheses, min(a, b), max(a, b) and three names:
| Name | Value |
|---|---|
noise |
The rule's noise at the column, 0 to 1. It is 0 in a rule without SIMPLEX noise. |
coverage |
The snow coverage at the column, 0 to 1. It is 0 in a season where no rule has use-snow-coverage: true. |
phase |
The phase, 0 (START) to 4 (END). |
The result is rounded, above 8 counts as 8, and 0 or less places no snow in that column. Without layers a snow rule places 1 layer. A value that is neither a number nor a formula skips the rule. On a block other than SNOW, layers is ignored.
The snow exists only on the players' screens, so deep snow has side effects:
- From 2 layers up, players stand on top of the snow, (layers - 1) / 8 of a block above the ground, where the server sees air.
- A player standing on 6 or more layers on open ground can count as flying and is kicked after about 4 seconds, unless
allow-flightistrueinserver.properties. - On a Minecraft 26.3 server, a player standing on 2 or more layers is sent the real blocks under their feet at most every 10 seconds, which takes that snow away.
Light melts snow
A rule that places SNOW skips every spot where the block light is 12 or higher, the level at which real snow layers melt.
- Only block light counts, not sunlight, and only
SNOW: ice, snow blocks and every other block a rule places ignore light. - A skipped spot does not count as placed, so the rules after it still run on that column.
- A light of level 13 or higher placed later melts the snow around it too, in worlds whose current season has a rule with
block: SNOW. - Removing a light sends nothing. The snow comes back the next time the chunk is sent.
Where to place
| Option | Default | What it does |
|---|---|---|
scan-for |
any surface | List of materials the surface must be. Unknown names are ignored, so a list without a valid name never matches. |
surface-blacklist |
none | List of materials the rule never applies on. Unknown names are ignored. |
require-snowable |
false |
Only surfaces that can hold snow. Leaves, stairs, bottom slabs, fences, fence gates, walls and blacklisted blocks fail, top and double slabs pass, and any other block must be occluding, which rules out plants. |
require-leaves-above |
false |
Only columns with a leaf block somewhere above the surface. |
require-non-matching-neighbor |
false |
Only when at least one of the four neighbours of the surface, at the same height, is not water, seagrass, tall seagrass or a kelp stem (KELP_PLANT). A chunk border counts as such a neighbour. |
allow-on-leaves |
false |
Also places the block in the air above every leaf block of the column, whatever the mode, checked only against chance and noise. stop-after-place does not end the column there. |
destroy-flora |
false |
With PLACE_ABOVE: also replaces the block above the surface when it is in destroyable-blocks, rolled with destroy-flora-chance. |
destroy-flora-chance |
1.0 |
Chance from 0 to 1 of replacing such a block, rolled on top of the rule's own chance. |
destroyable-blocks |
small plants | What destroy-flora may replace. Without it: short and tall grass, the 12 small flowers, sweet berry bush, both mushrooms and, from 1.21.5, leaf litter. |
scan-for,surface-blacklist,destroyable-blocks,block-poolandphase-densitymust be YAML lists, andphase-multipliersandnoisesections with indented keys. A single value on the key's own line (scan-for: GRASS_BLOCK) is ignored without a warning, so ascan-forwritten that way matches every surface.- The block above the surface is always air, leaves, a snow layer or moss carpet, so
destroy-floraonly does something whendestroyable-blocksnames one of those.
How often
| Option | Default | What it does |
|---|---|---|
chance |
1.0 |
Chance that a column which passed the checks gets the block: 0 to 1, or a percentage like 5%. |
phase-multipliers |
none | Section with the keys START, EARLY, MIDDLE, LATE and END (not case-sensitive) that multiplies chance in that phase. A phase left out uses 1. An unknown key logs a warning and is ignored. |
phase-density |
none | List of up to five chances for START to END, used instead of chance and phase-multipliers. A phase past the end of the list uses 1. |
use-snow-coverage |
false |
Places the block only where there is snow coverage. Replaces chance, phase-multipliers and phase-density. |
first-snowfall-phase |
1 |
Phase number from which snow coverage can build, 0 (START) to 4 (END). Only the first rule of the season with use-snow-coverage, by priority, counts. |
Noise
A noise section gives a rule a smooth pattern across the world. Its value at a column runs from 0 to 1: the share of the ground with a lower value, whatever the other noise options are.
| Option | Default | What it does |
|---|---|---|
noise.type |
NONE |
SIMPLEX turns the noise on. Not case-sensitive. |
noise.threshold |
0.0 |
The rule only applies where the noise is at or above this value: 0.7 keeps the 30 percent of the ground with the highest noise. |
noise.scale |
0.02 |
How fast the pattern changes per block. Lower makes bigger patches. |
noise.octaves |
1 |
Layers of detail, 1 to 8. More octaves roughen the edges of the patches. |
noise.lacunarity |
2.0 |
With more than one octave: how much finer each octave is than the one before. |
noise.persistence |
0.5 |
With more than one octave: how strong each octave is compared with the one before. |
noise.style |
SMOOTH |
BILLOW gives rounded blobs with thin creases between them, RIDGED thin ridges with wide hollows. |
noise.stretch |
1.0 |
How many times longer the patches are along angle than across it. 0 or less skips the rule. |
noise.angle |
0 |
Direction of the stretch in degrees: 0 along x (east and west), 90 along z. With stretch: 1.0 it only turns the pattern. |
noise.seed-offset |
made from the rule id | A whole number that picks another pattern. Give two rules the same value for the same pattern. |
Snow coverage
Snow coverage is a number from 0 to 1 per column. A rule with use-snow-coverage: true places its block only where there is coverage, and a layers formula reads it as coverage. In every world, snow only shows from the phase in first-snowfall-phase on, and never in END unless that is 4.
In a world with the weather simulation
Each column keeps its own snow cover, so snow lies where it snowed. The cover changes with the weather there:
- It grows from 0 to 1 within
weather.snow-cover.build-minuteswhile snow falls there (rain aboveweather.rain-precip-thresholdwith ground air belowweather.snow-temp-threshold). - Rain melts it within
rain-melt-minutes. - Dry air at or above the snow temperature thaws it within
thaw-minutes. - Cold air without snowfall keeps it as it is.
The times are weather minutes, see Weather.
- A partial cover puts snow on that share of the blocks, always the same ones.
- Players see the snow settle and melt as the cover changes.
- Columns with no player near keep their snow until the weather runs there again. The cover is saved with the weather in the world folder and survives a restart. It is cleared when the world reaches
ENDand when its season changes. - With shared weather, each server keeps and saves its own cover from the weather it receives.
In other worlds
The coverage is one number per world, kept in memory and 0 again after a restart. It is 0 before first-snowfall-phase. A chunk sent while the world has a vanilla storm (rain or snow) raises it to the ceiling of the current phase. Between storms it holds, but never above the ceiling:
first-snowfall-phase |
START |
EARLY |
MIDDLE |
LATE |
END |
|---|---|---|---|---|---|
0 |
0.33 | 0.67 | 1.00 | 0.50 | 0 |
1 |
0 | 0.40 | 0.80 | 0.67 | 0 |
2 |
0 | 0 | 0.50 | 1.00 | 0 |
3 |
0 | 0 | 0 | 0.67 | 0 |
4 |
0 | 0 | 0 | 0 | 1.00 |
- With
SIMPLEXnoise the columns with the highest noise are covered first. Without noise each column rolls on its own. - The coverage is only worked out while chunks are sent. Chunks sent earlier keep their snow until they are sent again.
- With sub-seasons off the phase is always
MIDDLE.
Shipped rules
| Season | Rule | What it does |
|---|---|---|
winter |
ice |
REPLACE_IN_PLACE with ICE on WATER that has a non-water neighbour, phase-density: [0.25, 0.5, 1.0, 1.0, 1.0], priority 5. |
winter |
snow |
SNOW with layers: "1 + 3 * noise * coverage", use-snow-coverage, first-snowfall-phase: 1, allow-on-leaves, require-snowable, destroy-flora, priority 40. SIMPLEX noise with scale 0.01, 3 octaves and stretch 2 along 250 degrees. Blacklist: water, lava, ice, packed and blue ice, farmland, barrier, both nyliums, glass and glass panes. |
spring |
flora |
On GRASS_BLOCK, chance 0.05 with phase multipliers 0.25, 0.5, 1, 1, 1, priority 10. Pool: SHORT_GRASS (weight 60) and the 12 small flowers (3 each). |
summer |
flora |
Like spring, with SWEET_BERRY_BUSH (5) added and phase multipliers 0.5, 0.25, 0.1, 0.1, 0.1. |
fall |
leaf-litter |
LEAF_LITTER in 4 variants under trees (require-leaves-above, require-snowable), chance 0.4, destroy-flora with chance 0.3, priority 20. |
fall |
flora |
On GRASS_BLOCK, chance 0.001, priority 30. Pool: SHORT_GRASS (60), both mushrooms (5 each) and the 12 small flowers (3 each). |
The 12 small flowers are dandelion, poppy, blue orchid, allium, azure bluet, the four tulips, oxeye daisy, cornflower and lily of the valley. example.yml holds snow, ice, flora and leaf-litter rules with enabled: false.
Switching rules at runtime
The seasonpopulator mechanic changes rules while the server runs:
action=disable;rule=<id>sets the chance of every rule with that id, in every season, to 0, andaction=enablegives it back. The id is matched exactly, case included. Rules withuse-snow-coverageorphase-density, such as the shippedsnowandice, do not read their chance, sodisabledoes not stop them.action=refreshsends the loaded chunks withinradiuschunks (3 by default) of the target again, to every player in the world who has them in view.enableanddisablelive in memory only:/ms reloadand a restart rebuild the rules from the files, and a rule withenabled: falsecannot be enabled. Neither changes chunks already sent, so follow them withrefresh.
Chunk refresh
Players see changed rules once their chunks are sent again, which happens:
- when the season or phase of the world changes. The chunks within the server's view distance of each player are sent again slowly: with view distance 10 and one player, the first after about 44 seconds and the last after about 88. Every further player in the world adds about as much again;
- with
seasonpopulator{action=refresh}; - when the snow cover near a player changes, in a world with the weather simulation, see Snow coverage;
- when a bright light is placed near a player in a world with a snow rule, see Light melts snow;
- when a player loads the chunk again, by moving away and back or by logging in again.
/ms reload sends no chunks.
Breaking populator blocks
Players can break a populator block that sits in the air, such as snow, a flower or leaf litter. It disappears for them and everyone within 64 blocks, and drops what the real block would drop with the right tool. A block that replaced another one, like ice on water, cannot be broken this way.
Examples
populators:
wildflowers:
priority: 30
scan-for:
- GRASS_BLOCK
chance: 8%
phase-multipliers:
START: 0.25
EARLY: 0.5
block-pool:
- material: DANDELION
weight: 3
- material: CORNFLOWER
weight: 1
noise:
type: SIMPLEX
scale: 0.03
threshold: 0.6
Flowers in patches over 40 percent of the grass, with an 8 percent chance per column inside them (a quarter of that in
START, half inEARLY).
populators:
drifts:
priority: 40
block: SNOW
use-snow-coverage: true
layers: "1 + 3 * noise * coverage"
require-snowable: true
noise:
type: SIMPLEX
scale: 0.01
octaves: 3
stretch: 2.0
angle: 25
Drifts about twice as long as they are wide, along 25 degrees: 1 layer of fresh snow, up to 4 at full cover where the noise is highest.
populators:
late-ice:
priority: 5
mode: REPLACE_IN_PLACE
block: ICE
scan-for:
- WATER
require-non-matching-neighbor: true
phase-density: [0.0, 0.0, 1.0, 1.0, 0.5]
Water next to a shore freezes from
MIDDLEon, and half of it thaws again inEND.