Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component=require('component')
- local debug=component.debug
- local world=debug.getWorld()
- local px=math.floor(debug.getX()/16)
- local pz=math.floor(debug.getZ()/16)
- function scan_chunk(cx,cz)
- if math.abs(cx%3)~=1 or math.abs(cz%3)~=1 then
- return
- end
- for ox=7,9 do
- for oz=7,9 do
- for y=math.random(5),120,5 do
- local result=handle_block_state(world.getBlockState(cx*16+ox,y,cz*16+oz))
- if result then
- print(x,y,z,result)
- end
- end
- end
- end
- end
- for d2=0,50 do
- local d=math.sqrt(d2)
- print('d= '..d,d2)
- for dx=-math.ceil(d),math.ceil(d) do
- local abs_dz=math.floor(math.sqrt(d2-dx*dx)+0.5)
- if abs_dz*abs_dz+dx*dx == d2 then
- print(dx,abs_dz)
- scan_chunk(px+dx,pz-abs_dz)
- scan_chunk(px+dx,pz+abs_dz)
- end
- end
- end
- function map_block_state(state)
- return state:match('^gregtech:ore_(%a*)')
- end
- for x=px-h_range,px+h_range,h_step do
- for z=pz-h_range,pz+h_range,h_step do
- for y=0,y_max,v_step do
- local result=handle_block_state(world.getBlockState(x,y,z))
- if result then
- print(x,y,z,result)
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment