minetest.register_node("more_tnt:tnt_rain_starter",{ description="TNT Rain Starter", groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5}, sounds = default.node_sound_wood_defaults(), tiles = {"tnt_rain_top.png","tnt_rain_bottom.png","tnt_rain_side.png"}, on_punch=function(pos,node,puncher) if puncher:get_wielded_item():get_name() == "default:torch" then minetest.get_meta(pos):set_int("rain",30) minetest.get_node_timer(pos):start(.5) end end, on_timer=function (pos,elapsed) rain=minetest.get_meta(pos):get_int("rain")-1 if rain < 0 then minetest.set_node(pos,{name="air"}) return false end minetest.get_meta(pos):set_int("rain",rain) for i=0,10 do minetest.set_node({x=pos.x+math.random(-25,25),y=pos.y+10,z=pos.z + math.random(-25,25)},{name="tnt:tnt_burning"}) end return true end }) minetest.register_craft({ output="more_tnt:tnt_rain_starter", recipe={{"tnt:tnt","tnt:tnt","tnt:tnt"}, {"tnt:tnt","tnt:tnt","tnt:tnt"}, {"tnt:tnt","tnt:tnt","tnt:tnt"}}, })