Water flowing

This commit is contained in:
2026-10-07 00:09:08 -03:00
parent 69c5c187db
commit b830196829
14 changed files with 1033 additions and 55 deletions
+1 -2
View File
@@ -6,9 +6,8 @@
"render_layer": "translucent",
"light_opacity": 1,
"alpha": 0.8,
"collision": false,
"item": false,
"replaceable": true,
"liquid": {},
"components": {
"bworld:water_source": {},
"bworld:fishable": {},
+2
View File
@@ -594,6 +594,8 @@ function register_buckets(ctx: ServerContext) {
on_interact(block, params, player) {
const bucket = player.held_item;
if (bucket?.id !== BUCKET) return false;
// only a liquid's source fills it, not where it's flowing
if ((ctx.world.get_state(block.x, block.y, block.z, "level") ?? 0) !== 0) return false;
ctx.world.set_block(block.x, block.y, block.z, "bworld:air");
bucket.count -= 1;
// the last one becomes the filled bucket in the hand, from a stack it goes in the inventory