forked from mtcontrib/throwing
1.4.1
This commit is contained in:
@ -68,7 +68,10 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
|
||||
end
|
||||
|
||||
if self.lastpos.x~=nil then
|
||||
if node.name ~= "air" then
|
||||
if node.name == 'air' then
|
||||
minetest.add_node(pos, {name="throwing:torch_trail"})
|
||||
minetest.get_node_timer(pos):start(0.1)
|
||||
elseif node.name ~= "air" and not string.find(node.name, "trail") then
|
||||
self.object:remove()
|
||||
if not string.find(node.name, "water") and not string.find(node.name, "lava") and not string.find(node.name, "torch") then
|
||||
local dir=vector.direction(self.lastpos, pos)
|
||||
@ -102,3 +105,14 @@ minetest.register_craft({
|
||||
{'group:coal', 'default:stick', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("throwing:torch_trail", {
|
||||
drawtype = "airlike",
|
||||
light_source = default.LIGHT_MAX-1,
|
||||
walkable = false,
|
||||
drop = "",
|
||||
groups = {dig_immediate=3},
|
||||
on_timer = function(pos, elapsed)
|
||||
minetest.remove_node(pos)
|
||||
end,
|
||||
})
|
||||
|
Reference in New Issue
Block a user