ecco7777

CC Pletora Block Scanner Laser Filter One Man Quarry

Jan 3rd, 2026 (edited)
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.90 KB | None | 0 0
  1. args={...}
  2.  
  3. if args[1]~=nil then
  4.     filter=args[1]
  5. else
  6. filter="minecraft:coal_ore/0 minecraft:iron_ore/0 minecraft:gold_ore/0 minecraft:diamond_ore/0 minecraft:redstone_ore/0 minecraft:emerald_ore/0 minecraft:lapis_ore/0appliedenergistics2:quartz_ore/0 appliedenergistics2:charged_quartz_ore/0thermalfoundation:ore/0 thermalfoundation:ore/1 thermalfoundation:ore/2 thermalfoundation:ore/3 thermalfoundation:ore/4 thermalfoundation:ore/5 thermalfoundation:ore/6 thermalfoundation:ore/7 thermalfoundation:ore/8 thermalfoundation:ore_fluid/0 thermalfoundation:ore_fluid/1 thermalfoundation:ore_fluid/2 thermalfoundation:ore_fluid/3 thermalfoundation:ore_fluid/4 thermalfoundation:ore_fluid/5ic2:resource/1 ic2:resource/2 ic2:resource/3 ic2:resource/4 bigreactors:oreyelloriteprojectred-exploration:ore/6biomesoplenty:gem_ore/0 biomesoplenty:gem_ore/1 biomesoplenty:gem_ore/2 biomesoplenty:gem_ore/3 biomesoplenty:gem_ore/4 biomesoplenty:gem_ore/5 biomesoplenty:gem_ore/6 biomesoplenty:gem_ore/7 thaumcraft:ore_amber/0 thaumcraft:ore_quartz/0 thaumcraft:ore_cinnabar/0 "
  7. end
  8. print("Filter set to: "..filter)
  9. print("Achtung!")
  10.  
  11. sc=peripheral.wrap("back")
  12.  
  13.  
  14.  
  15. function fingerprint(block)
  16.     return block.name.."/"..block.metadata
  17. end
  18.  
  19. function main()
  20.     while true do
  21.         --scan
  22.         blocks={}
  23.         scanned=sc.scan()
  24.         for ib=#scanned/2+0.5,#scanned do
  25.             if string.find(filter,fingerprint(scanned[ib])) then
  26.                 table.insert(blocks,scanned[ib])
  27.             end
  28.         end
  29.         if #blocks>0 then
  30.             for il=1,#blocks do
  31.                 block=blocks[il]
  32.                 pitch = -math.atan2(block.y, math.sqrt(block.x * block.x + block.z * block.z))
  33.                 yaw = math.atan2(-block.x, block.z)
  34.                 sc.fire(math.random()*2+math.deg(yaw)-1,math.random()*2+math.deg(pitch)-1,5)
  35.             end
  36.         end
  37.         sleep(0.5)
  38.     end
  39. end
  40.  
  41. main()
Advertisement
Add Comment
Please, Sign In to add comment