Make TNT and TNT Minecart use the explosions API

The old api from mcl_tnt is still left in the code, and used by the
mobs.
This commit is contained in:
Elias Åström 2020-04-17 20:36:39 +02:00
parent ca7c8c23c7
commit fd05259202
4 changed files with 5 additions and 4 deletions

View file

@ -206,7 +206,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
-- Explode if already ignited
if self._boomtimer then
self.object:remove()
tnt.boom(pos)
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
end
@ -249,7 +249,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
local pos = self.object:get_pos()
if self._boomtimer <= 0 then
self.object:remove()
tnt.boom(pos)
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
else
tnt.smoke_step(pos)