Proper season and time conditions for fishing
This commit is contained in:
@@ -126,11 +126,34 @@ does nothing unless they hold.
|
||||
| [Blocks](../blocks/index.md) | `"loot_table"` in the block's json, rolled when it breaks, with its states and the tool. `"drops"` is the shorthand for one of an item. |
|
||||
| [Mobs](../entities/index.md) | `"loot_table"` in the entity's json, rolled when it dies. `killed_by_player` holds when a player killed it. |
|
||||
| [Crops](../blocks/crops.md) | Their block's `loot_table`, with `block_state` on `age` for grown or not. `harvest` is a table for picking. |
|
||||
| Fishing | The fishing rod's `loot_table`, `bworld:gameplay/fishing`. |
|
||||
| Fishing | The fishing rod's `loot_table`, `bworld:gameplay/fishing`, rolled when it's reeled in. See [Fishing](#fishing). |
|
||||
| Scripts | `ctx.loot.roll` and `ctx.loot.fill`, for anything else, like chests in structures. |
|
||||
|
||||
`check-mods` checks that every item, tag and table a table names exists, and that the tables blocks and mobs name do.
|
||||
|
||||
## Fishing
|
||||
|
||||
The base game adds two conditions for picking fish by where and when they're reeled in:
|
||||
|
||||
| `condition` | Fields | Holds when |
|
||||
| --------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `bworld:season` | `seasons` | The [season](../worldgen/biomes.md#seasons) where it happens is one of `seasons`, like `["summer", "autumn"]`. |
|
||||
| `bworld:time` | `from`, `to` | The hour on a 24 hour clock is from `from` up to `to`, like `6.5` for 06:30. When `from` is past `to` it wraps around midnight. |
|
||||
|
||||
A fish without a `bworld:season` is caught in every season, and one without `bworld:time` all day:
|
||||
|
||||
```json
|
||||
{
|
||||
"item": "my_mod:catfish",
|
||||
"conditions": [
|
||||
{ "condition": "bworld:season", "seasons": ["summer", "autumn"] },
|
||||
{ "condition": "bworld:time", "from": 20, "to": 4 }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
When every fish can be ruled out, nothing is caught, so keep one without conditions.
|
||||
|
||||
## From a Script
|
||||
|
||||
Server scripts roll tables, fill containers, and add conditions, functions and changes of their own:
|
||||
|
||||
Reference in New Issue
Block a user