TovLenin

laser scaner

Aug 21st, 2013
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. l = peripheral.wrap("left")
  2. while true do
  3.  sleep(4)
  4.  x, y, z, blockID, blockMeta, blockResistance = l.getFirstHit()
  5.  if (x ~= -1) and (blockResistance ~= -1) then
  6.    print ("Hit: (" .. x .. "; " .. y .. "; " .. z .. ") ID: " .. blockID .. ". Resistance: " .. blockResistance)
  7.  else
  8.    print ("No hits.")
  9.  end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment