Guest User

Untitled

a guest
Jun 5th, 2014
204
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_craftitem("mtz_tests:treespawner", {
  2. description = "Test Experimental Tree",
  3. inventory_image = "default_stick.png",
  4. on_use = function(itemstack, user, pointed_thing)
  5. local playername = user.get_player_name(user)
  6. local hasprivs = minetest.check_player_privs(playername, {tester=true})
  7. if hasprivs == true and pointed_thing.type == "node" then
  8. local pos = pointed_thing.above
  9. minetest.env:spawn_tree(pos, experimental_tree)
  10. end
  11. end
  12. })
RAW Paste Data