Make mobs and bed use mcl_explosions

This commit is contained in:
Wuzzy 2020-05-02 18:50:25 +02:00
parent 6a576c50a0
commit 56d484f69b
5 changed files with 21 additions and 41 deletions

View file

@ -5,6 +5,7 @@ local pi = math.pi
local player_in_bed = 0
local is_sp = minetest.is_singleplayer()
local weather_mod = minetest.get_modpath("mcl_weather") ~= nil
local explosions_mod = minetest.get_modpath("mcl_explosions") ~= nil
-- Helper functions
@ -307,8 +308,8 @@ function mcl_beds.on_rightclick(pos, player, is_top)
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, is_tnt = false})
if explosions_mod then
mcl_explosions.explode(pos, 5, {drop_chance = 1.0, fire = true})
end
return
end