mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Fix #1590 (Bed drops itself when gets exploded)
This commit is contained in:
parent
acbdc937b4
commit
8b23388d63
1 changed files with 4 additions and 0 deletions
|
@ -301,7 +301,11 @@ function mcl_beds.on_rightclick(pos, player, is_top)
|
||||||
local dim = mcl_worlds.pos_to_dimension(pos)
|
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||||
if dim == "nether" or dim == "end" then
|
if dim == "nether" or dim == "end" then
|
||||||
-- Bed goes BOOM in the Nether or End.
|
-- Bed goes BOOM in the Nether or End.
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
|
minetest.remove_node(string.sub(node.name, -4) == "_top" and vector.subtract(pos, dir) or vector.add(pos, dir))
|
||||||
if explosions_mod then
|
if explosions_mod then
|
||||||
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
|
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue