Advertisement
toastonrye

Geo Scanner Crude

Apr 29th, 2025 (edited)
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | Gaming | 0 0
  1. -- this is a CRUDE script for finding ancient debris
  2. -- it was made in all the mods 10 modpack, script may break in different mod versions
  3. -- script stops when first block is found, break ore and rerun script.
  4. -- https://pastebin.com/BrCKkttY
  5. -- https://www.youtube.com/watch?v=9PRjpd4lUDk
  6.  
  7. term.clear()
  8. local geo = peripheral.find("geoScanner")
  9. if not geo then error("geo scanner peripheral not found") end
  10.  
  11. local scan = geo.scan(16)
  12. print("Starting search.")
  13. for i, data in ipairs(scan) do
  14.  if data.name == "minecraft:ancient_debris" then
  15.   --print("X: ",data.x,"  Y: ",data.y,"  Z:", data.z)
  16.   if data.x < 0 then
  17.    print("go WEST ", math.abs(data.x))
  18.   else
  19.    print("go EAST ", math.abs(data.x))
  20.   end
  21.  
  22.   if data.y < 0 then
  23.    print("go DOWN ", math.abs(data.y))
  24.   else
  25.    print("go UP ", math.abs(data.y))
  26.   end
  27.  
  28.   if data.z < 0 then
  29.    print("go NORTH ", math.abs(data.z))
  30.   else
  31.    print("go SOUTH ", math.abs(data.z))
  32.   end
  33.   break
  34.  end
  35. end
  36. print("Search done.")
  37.  
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement