From d8e8842a7a0ce39cff454c5eee1857ef71ea5026 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 16 Feb 2017 22:07:54 +0100 Subject: [PATCH] Generalize dig_by_water group to support group:water --- mods/CORE/mcl_core/functions.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_core/functions.lua b/mods/CORE/mcl_core/functions.lua index d9471a2797..4f06ce5664 100644 --- a/mods/CORE/mcl_core/functions.lua +++ b/mods/CORE/mcl_core/functions.lua @@ -101,7 +101,8 @@ minetest.register_abm({ for zp=-1,1 do local p = {x=pos.x+xp, y=pos.y, z=pos.z+zp} local n = minetest.get_node(p) - if (n.name=="mcl_core:water_flowing") then + local d = minetest.registered_nodes[n.name] + if (d.groups.water and d.liquidtype == "flowing") then drop_attached_node(pos) minetest.dig_node(pos) break @@ -111,7 +112,8 @@ minetest.register_abm({ for yp=-1,1 do local p = {x=pos.x, y=pos.y+yp, z=pos.z} local n = minetest.get_node(p) - if (n.name=="mcl_core:water_flowing") then + local d = minetest.registered_nodes[n.name] + if (d.groups.water and d.liquidtype == "flowing") then drop_attached_node(pos) minetest.dig_node(pos) break