Fix bed not dropping when top part is dug

This commit is contained in:
Lizzy Fleckenstein 2021-01-24 18:54:17 +01:00
parent 745b7063a5
commit 9ce8c95f8c
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,7 @@ local function destruct_bed(pos, oldnode)
end
minetest.check_for_falling(pos)
elseif string.sub(node.name, -7) == "_bottom" then
minetest.add_item(pos, node.name)
pos2 = vector.add(pos, dir)
node2 = minetest.get_node(pos2)
if node2 and string.sub(node2.name, -4) == "_top" then
@ -86,6 +87,7 @@ function mcl_beds.register_bed(name, def)
node_box = node_box_bottom,
selection_box = selection_box_bottom,
collision_box = collision_box_bottom,
drop = "",
on_place = function(itemstack, placer, pointed_thing)
local under = pointed_thing.under