From 698c29733f06a7fcb7e755bf26ee46b33b00699b Mon Sep 17 00:00:00 2001 From: kay27 Date: Mon, 3 Jan 2022 07:42:33 +0400 Subject: [PATCH] #38 Fix cauldrons --- mods/ITEMS/mcl_buckets/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 931214b95..61efc02e4 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -186,8 +186,12 @@ function mcl_buckets.register_liquid(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