Add season for crops

This commit is contained in:
2026-10-10 14:48:29 -03:00
parent 588655e7df
commit 373d9f83e5
10 changed files with 103 additions and 19 deletions
+14 -11
View File
@@ -4,8 +4,10 @@ A crop is a block with an `age` state, the base game's `bworld:crop` [component]
places it. Adding one takes no code.
Crops grow on Stardew Valley's clock with Minecraft's rules: every morning at 06:00, a crop whose farmland was watered
the day before grows a day, then all farmland dries out. The crop shows the stage for how far along it is.
`mods/farmersdelight` adds its cabbages, onions, tomatoes and rice this way.
the day before grows a day, then all farmland dries out. The crop shows the stage for how far along it is. A crop with
`seasons` dies the first morning that's in another season, turning into a `bworld:dead_bush`, so a summer crop has to be
harvested before autumn comes. The season is its biome's, so a crop that only grows in summer is always out of season in
a snowy biome. `mods/farmersdelight` adds its cabbages, onions, tomatoes and rice this way.
## A Basic Crop
@@ -96,15 +98,16 @@ and 1 to 4 seeds, like Minecraft's wheat:
## Parameters
| Param | Meaning |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `days` | Watered mornings from planting to fully grown. |
| `stages` | How many ages it shows, 0 to `stages - 1`, spread evenly over `days`. The `age` state must fit them. |
| `fertilizer` | An item that grows it a day right away when used on it, like bone meal. |
| `water` | `"farmland"` (the default) needs watered farmland under it. `"always"` grows every morning. |
| `regrow_days`, `harvest` | Right clicking it once grown picks it, dropping what the [loot table](../resources/loot_tables.md) `harvest` gives, and it grows back after `regrow_days`. |
| `upper` | `{ block, stages, supporting_age }`: its last stages grow a second block on top, see below. |
| `leaves` | What the spot becomes when it's broken, like the water rice was planted in. |
| Param | Meaning |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `days` | Watered mornings from planting to fully grown. |
| `stages` | How many ages it shows, 0 to `stages - 1`, spread evenly over `days`. The `age` state must fit them. |
| `fertilizer` | An item that grows it a day right away when used on it, like bone meal. |
| `water` | `"farmland"` (the default) needs watered farmland under it. `"always"` grows every morning. |
| `regrow_days`, `harvest` | Right clicking it once grown picks it, dropping what the [loot table](../resources/loot_tables.md) `harvest` gives, and it grows back after `regrow_days`. |
| `upper` | `{ block, stages, supporting_age }`: its last stages grow a second block on top, see below. |
| `leaves` | What the spot becomes when it's broken, like the water rice was planted in. |
| `seasons` | The [seasons](../worldgen/biomes.md#seasons) it grows in, like `["spring", "summer"]`. A morning in any other season turns it into a dead bush. Every season when not set. |
## Harvesting By Hand