local torch_timer = 3600 minetest.override_item("default:torch", { description = "Torch", inventory_image = "", wield_image = "", tiles = { {name="mytorches_torch_top.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5}}, "mytorches_torch_bottom.png", {name="mytorches_torch1.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5}}, {name="mytorches_torch1.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5}}, {name="mytorches_torch1.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5}}, {name="mytorches_torch1.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.5}}, }, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", walkable = false, damage_per_second = 1, drop = "default:torch", light_source = 14, groups = {dig_immediate=3}, node_box = { type = "fixed", fixed = { {-0.0625, -0.5, -0.03, 0.0625, 0.4375, 0.03}, {-0.03, -0.5, -0.0625, 0.03, 0.4375, 0.0625}, {-0.03, 0.3125, -0.03, 0.03, 0.5, 0.03}, {-0.095, 0.125, -0.0625, 0.095, 0.375, 0.0625}, {-0.0625, 0.125, -0.095, 0.0625, 0.3125, 0.095}, } }, on_place = function(itemstack, placer, pointed_thing) local timer = minetest.get_node_timer(pointed_thing.above) timer:start(torch_timer) if pointed_thing.type ~= "node" then return itemstack end local p0 = pointed_thing.under local p1 = pointed_thing.above local dir = { x = p1.x - p0.x, y = p1.y - p0.y, z = p1.z - p0.z } -- if p1 == "air" then if p0.y>p1.y then minetest.add_node(p1, {name="mytorches:torch_ceiling"}) elseif p0.y