Water flowing
This commit is contained in:
@@ -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": {},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user