Waterlogging

This commit is contained in:
2026-10-07 20:56:24 -03:00
parent 78117f65c9
commit 757ee74bc7
26 changed files with 459 additions and 73 deletions
+22
View File
@@ -150,6 +150,28 @@ So it spreads one block a step, falls off edges and spreads again where it lands
its source is gone. It only flows into air, and stops at chunks that aren't loaded. Buckets only pick up sources. Flows
still going when the server stops don't carry on after it starts again until something next to them changes.
### Waterlogging
A block that isn't a liquid can hold one, like Minecraft's waterlogged fences. `waterloggable` names the liquid:
```json
"waterloggable": "bworld:water"
```
- It gets a `waterlogged` [state](states.md) of its own, after any it lists: `1` while it holds a source of the liquid.
It uses one of the block's 16 bits.
- Placed into a source of the liquid, it holds it. Placed into flowing liquid or anything else, it doesn't. With
`"waterlogged_only": true` it can only be placed into a source, so it's always placed holding it, like Farmer's
Delight's rice.
- Using the liquid's item on it, like a water bucket, fills it. An item that aims at liquids, like a bucket, uses the
liquid in it instead of the block, so a bucket takes the water back out and the block stays.
- It's a source of the liquid that never drains: the liquid flows out of it, and entities swim and are pushed in it.
Flowing liquid doesn't flow into it.
- Broken, it leaves a source of the liquid behind.
- Raycasts with `liquids` other than `"none"` hit the liquid in it, filling the block, and say the liquid's id.
The base game's wooden fences are waterloggable, and Farmer's Delight's rice is `waterlogged_only`.
## Tinting
`tint` draws a block's textures in a color, for textures painted in greys: