Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created October 1, 2012 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/3812270 to your computer and use it in GitHub Desktop.
Save PilzAdam/3812270 to your computer and use it in GitHub Desktop.
on_use = function(itemstack, user, pointed_thing)
if pointed_thing and pointed_thing.above and minetest.env:get_node(pointed_thing.above).name == "air" then
minetest.sound_play("flint", {pos=pointed_thing.under})
minetest.env:add_node(pointed_thing.above, {name="fire:basic_flame"})
itemstack:add_wear(1000)
return itemstack
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment