Rename all "liquid" mentions to "fluid"
This commit is contained in:
@@ -87,7 +87,7 @@ when what it hangs from is gone. A block whose states follow from its neighbors,
|
||||
clients see it change right away.
|
||||
|
||||
`on_state_change` runs when the block's states change and it stays the same block: a script's `ctx.world.set_state`, a
|
||||
rule, a liquid's level. `before` is every state as it was, by name, and `ctx.world.get_state` gives what they are now.
|
||||
rule, a fluid's level. `before` is every state as it was, by name, and `ctx.world.get_state` gives what they are now.
|
||||
It's how a block reacts to a state something else sets on it, like a machine another mod's script turns off. It runs
|
||||
right away, before the blocks beside it are told, like `on_create`. Replacing the block with `set_block` runs `on_break`
|
||||
and `on_create` instead, and setting a state to what it already is runs nothing.
|
||||
@@ -296,20 +296,20 @@ catch up. If it's further behind than that, it skips the rest and logs a warning
|
||||
|
||||
`mods/bworld/scripts/server.ts` registers these, and any mod that depends on `bworld` can use them:
|
||||
|
||||
| Component | Params | What it does |
|
||||
| ----------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `bworld:storage` | `rows` | A chest: `rows` × 9 slots, dropped when it's broken. |
|
||||
| `bworld:shipping_bin` | `rows` | Like `bworld:storage`, and every morning at 06:00 sells what's in it with a `base_sell_value` for coins. |
|
||||
| `bworld:furnace` | none | Smelts with `furnace` and `fuel` [recipes](../resources/recipes.md). Needs `lit` and `facing` states, see `blocks/furnace.json`. |
|
||||
| `bworld:smithing_table` | none | Upgrades tools with `smithing` recipes. |
|
||||
| `bworld:stonecutter` | none | Cuts one item into another with `bworld:stonecutting` recipes, picked from a list. |
|
||||
| `bworld:hoeable` | `tool`, `into` | Right clicking with a tool of type `tool` turns it into `into`, like a hoe on grass. |
|
||||
| `bworld:farmland` | none | Watered with the watering can, dries out every morning. |
|
||||
| `bworld:crop` | see [Crops](crops.md) | Grows a stage every morning its farmland was watered. |
|
||||
| `bworld:crop_top` | see [Crops](crops.md) | The top half of a two block crop, like rice. |
|
||||
| `bworld:water_source` | none | Refills the watering can. |
|
||||
| `bworld:fishable` | `loot_table`? | The fishing rod's hook floats on it and fish bite there when it lands in it. What's caught is `loot_table`, `bworld:gameplay/fishing` when not given, built from the fish whose `liquid` is this block. |
|
||||
| `bworld:trapdoor` | none | Opens and closes when right clicked, and is placed like Minecraft's (both are rules, in the shared script). Needs `facing` (2 bits), `half` and `open` states, see `blocks/oak_trapdoor.json`. |
|
||||
| `bworld:fence` | `connects_to` | Joins the blocks in the tag `connects_to` and sturdy sides of other blocks, except leaves. Needs the `north`, `east`, `south` and `west` states. |
|
||||
| Component | Params | What it does |
|
||||
| ----------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `bworld:storage` | `rows` | A chest: `rows` × 9 slots, dropped when it's broken. |
|
||||
| `bworld:shipping_bin` | `rows` | Like `bworld:storage`, and every morning at 06:00 sells what's in it with a `base_sell_value` for coins. |
|
||||
| `bworld:furnace` | none | Smelts with `furnace` and `fuel` [recipes](../resources/recipes.md). Needs `lit` and `facing` states, see `blocks/furnace.json`. |
|
||||
| `bworld:smithing_table` | none | Upgrades tools with `smithing` recipes. |
|
||||
| `bworld:stonecutter` | none | Cuts one item into another with `bworld:stonecutting` recipes, picked from a list. |
|
||||
| `bworld:hoeable` | `tool`, `into` | Right clicking with a tool of type `tool` turns it into `into`, like a hoe on grass. |
|
||||
| `bworld:farmland` | none | Watered with the watering can, dries out every morning. |
|
||||
| `bworld:crop` | see [Crops](crops.md) | Grows a stage every morning its farmland was watered. |
|
||||
| `bworld:crop_top` | see [Crops](crops.md) | The top half of a two block crop, like rice. |
|
||||
| `bworld:water_source` | none | Refills the watering can. |
|
||||
| `bworld:fishable` | `loot_table`? | The fishing rod's hook floats on it and fish bite there when it lands in it. What's caught is `loot_table`, `bworld:gameplay/fishing` when not given, built from the fish whose `fluid` is this block. |
|
||||
| `bworld:trapdoor` | none | Opens and closes when right clicked, and is placed like Minecraft's (both are rules, in the shared script). Needs `facing` (2 bits), `half` and `open` states, see `blocks/oak_trapdoor.json`. |
|
||||
| `bworld:fence` | `connects_to` | Joins the blocks in the tag `connects_to` and sturdy sides of other blocks, except leaves. Needs the `north`, `east`, `south` and `west` states. |
|
||||
|
||||
Item components work the same way, see [Items](../items/index.md#item-components).
|
||||
|
||||
Reference in New Issue
Block a user