mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Generalize dig_by_water group to support group:water
This commit is contained in:
parent
4d78052851
commit
d8e8842a7a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user