Fix thistle not getting dug by water properly
This commit is contained in:
parent
272f3cdfd4
commit
8a15505df9
@ -131,11 +131,14 @@ minetest.register_lbm(
|
||||
-- Vertical plants
|
||||
|
||||
function default.dig_up(pos, node, digger)
|
||||
-- if digger == nil then return end
|
||||
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
if nn.name == node.name then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
if digger then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
else
|
||||
minetest.remove_node(np)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1067,6 +1067,9 @@ minetest.register_node(
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
on_flood = function(pos, oldnode, newnode)
|
||||
default.dig_up(pos, oldnode)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Food
|
||||
|
Loading…
Reference in New Issue
Block a user