mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-12-01 00:13:05 +00:00
Explode bed when used in End or Nether
This commit is contained in:
parent
3fefbf5fc4
commit
c97a14e969
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
mcl_sounds?
|
mcl_sounds?
|
||||||
|
mcl_util?
|
||||||
mcl_wool?
|
mcl_wool?
|
||||||
mcl_dye?
|
mcl_dye?
|
||||||
|
mcl_tnt?
|
||||||
|
|
|
@ -136,6 +136,17 @@ function mcl_beds.skip_night()
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_beds.on_rightclick(pos, player)
|
function mcl_beds.on_rightclick(pos, player)
|
||||||
|
if minetest.get_modpath("mcl_init") then
|
||||||
|
local _, dim = mcl_util.y_to_layer(pos.y)
|
||||||
|
if dim == "nether" or dim == "end" then
|
||||||
|
-- Bed goes BOOM in the Nether or End.
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
if minetest.get_modpath("mcl_tnt") then
|
||||||
|
tnt.boom(pos, {radius = 4, damage_radius = 4})
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local ppos = player:getpos()
|
local ppos = player:getpos()
|
||||||
local tod = minetest.get_timeofday() * 24000
|
local tod = minetest.get_timeofday() * 24000
|
||||||
|
|
Loading…
Reference in a new issue