Plant Configuration
Register knee-high, non-collidable flora (Decoration static objects) that scatter at world generation and sway in the wind.
Plants are flora — knee-high, non-collidable ground cover (tall grass, wildflowers, ferns, reeds) that scatters naturally during world generation and sways in the wind and as the player walks through it. Under the hood they are Decoration static objects: the same catalog and worldgen machinery as trees, minus any collision or inventory. This is the catalog file that registers them.
The schema is identical to tree-config.md — spacing, footprint, spawn chance, hitbox, variations, field inheritance, biome linking, and per-variation particles all behave exactly the same — so this page focuses on what is flora-specific. Read the tree config for the shared details.
File Location
Register the file in your mod’s manifest (mods/<YourMod>/<YourMod>.yaml):
plant-config: plant-config.yaml
Then create the file it points to, relative to your mod’s folder:
mods/<YourMod>/plant-config.yaml
The file is a single plants: list. Each entry is one plant type with one or more named variations, exactly like a tree entry.
Minimal Example
plants:
- name: tall_grass
spacing:
x: 4
y: 8
max-size:
width: 2
height: 3
spawn-chance: 0.6
hitbox:
width: 12.0
height: 16.0
shader: flora_sway # assign the sway shader (see below)
variations:
- name: tall_grass
Because plants are non-collidable and have no inventory, most entries need nothing beyond spacing, footprint, a hitbox (for break targeting), and a variation. Omitting tool-break-types leaves the plant breakable by hand.
Fields
Every field on a plants entry means the same thing as on a tree entry: name, type, biomes, spacing, max-size, spawn-chance, spawn-chance-inverse, attach, submerged, submerged-max-depth, hitbox, tool-break-types, power-required, time-to-break-ms, drop-table, variations, particles, and shader. See that page for the full table, field inheritance, and per-variation particles.
Flora-specific notes:
- Non-collidable. A plant never blocks movement — the player and entities walk straight through it. There is no collision toggle; it is non-collidable by construction. (Its
hitboxis used only to target it for breaking.) - Breakable by hand. With no
tool-break-types, any tool or a bare hand breaks it (subject topower-required). Add adrop-tableif breaking it should yield an item. shader. Point this at a sway shader to make the plant bend in the wind (see Sway). Without it, the plant renders as a static (non-swaying) sprite.- Density. Flora is meant to scatter, not carpet. Tune
spacing(small = denser) andspawn-chanceto taste; very high densities of per-plant objects can get expensive.
Textures
Flora textures live under a decorations/ folder (parallel to trees’ trees/), registered in a plants.yaml texture manifest:
mods/<YourMod>/assets/textures/decorations/plants.yaml
mods/<YourMod>/assets/textures/decorations/tall_grass.png
# decorations/plants.yaml
textures:
- name: tall_grass
sprites:
- name: tall_grass
frame-count: 1
frame-width: 24
frame-height: 32
Author the sprite rooted at the bottom of the image (the base is where it plants into the ground and where the sway pins it). A plant of any height is just a taller sprite — the sway shears the whole sprite as a unit, base pinned, tip displaced.
Sway (shader)
The bend-in-the-wind effect is a per-type static-object shader you assign with shader:. It is not automatic: a plant with no shader renders static. The shipped Creation mod includes a reusable flora_sway shader; assign it (or your own) with:
plants:
- name: tall_grass
# ...
shader: flora_sway
The sway is purely cosmetic and client-side — no collision, no server state. It is a height-weighted horizontal shear (base pinned, tip displaced) driven by three shared per-frame shader values: a frame clock (idle rustle), the player’s world position (a shove away as you pass), and a wind scalar sourced from the active weather. See shader config for the shader contract and those frame fields, and weather config for the wind-base / wind-gust weather fields that drive the wind. Because it rides the per-type static-object shader path, only plants that opt in sway — trees and interactables are unaffected.
Choosing where a plant spawns
Identical to trees: link a plant to a biome from either side — the plant’s biomes: list, or the biome’s static-object-spawns: list. The two are additive. See Choosing where a tree spawns. A plant with no biome link never spawns naturally.
Last updated