From 584a75df76649e4935248f1326d8efb432442aa4 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 20 Feb 2022 17:36:23 +0100 Subject: [PATCH] Fix filling cauldrons with water. When using a bucket of water on a cauldron, this would not fill the cauldron as expected, but deposit a water source block on top of the cauldron instead. Applied patch from mineclone5 #38 (commit # 698c29733f06a7fcb7e755bf26ee46b33b00699b) from mineclone5 that fixes this problem. --- mods/ITEMS/mcl_buckets/init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 5d372ef1f..d3cabc853 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -162,8 +162,11 @@ local function on_place_bucket(itemstack, user, pointed_thing, def) local undernode = get_node(pointed_thing.under) local abovenode = get_node(pointed_thing.above) - local buildable1 = minetest.registered_nodes[undernode.name] and minetest.registered_nodes[undernode.name].buildable_to - local buildable2 = minetest.registered_nodes[abovenode.name] and minetest.registered_nodes[abovenode.name].buildable_to + local name1, name2 = undernode.name, abovenode.name + local regnode1, regnode2 = minetest.registered_nodes[name1], minetest.registered_nodes[name2] + local buildable1 = regnode1 and (regnode1.buildable_to or regnode1.groups.cauldron == 1) + local buildable2 = regnode2 and (regnode2.buildable_to or regnode2.groups.cauldron == 1) + if not buildable1 and not buildable2 then return itemstack end --if both nodes aren't buildable_to, skip if buildable1 then