Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- op = peripheral.wrap("left")
- x1, y1, z1 = op.getPos()
- x1 = x1 + 1
- temp_x = x1
- temp_y = y1
- temp_z = z1
- blueprint = {}
- function getBlock()
- blockID = op.getBlockIDAtPos(temp_x,temp_y,temp_z)
- blockData = op.getBlockDataAtPos(temp_x,temp_y,temp_z)
- coords = {temp_x,temp_y,temp_z,blockID,blockData}
- setmetatable(coords, self)
- return coords
- end
- function recordBlock()
- block = getBlock()
- table.insert(blueprint,textutils.serialize(block))
- end
- while temp_y <= y1 + 25 do
- temp_x = x1
- while temp_x <= x1 + 25 do
- temp_z = z1
- while temp_z <= z1 + 25 do
- recordBlock()
- temp_z = temp_z + 1
- end
- temp_x = temp_x + 1
- end
- temp_y = temp_y + 1
- end
- h = fs.open("blueprint","w")
- blueprintS = textutils.serialize(blueprint)
- h.write(blueprintS)
- h.close()
- print("done")
Advertisement
Add Comment
Please, Sign In to add comment