Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startX = 728
- startY = 253
- startZ = -169
- function gotoChunkCenter()
- print("Relocating to chunk center...")
- while x ~= startX or z ~= startZ do
- local x,y,z = gps.locate()
- turtle.refuel()
- if x ~= startX then
- if x > startX then
- turtle.back()
- else
- turtle.forward()
- end
- end
- if z ~= startZ then
- turtle.turnRight()
- if z > startZ then
- turtle.back()
- else
- turtle.forward()
- end
- turtle.turnLeft()
- end
- x,y,z = gps.locate()
- end
- print(" Reached chunk center.")
- end
- RelativePosition = {x = 0, y = 0, z = 0}
- function RelativePosition:new ()
- self.x = 0
- self.y = 0
- self.z = 0
- return self
- end
- BLOCK_IDS = {
- digiminer = "mekanism:digital_miner",
- tesseract = "mekanism:quantum_entangloporter"
- }
- function findItemSlot(itemName)
- print("Finding item '"..itemName.."'...")
- for i=0,16 do
- print(" Testing slot "..i)
- turtle.select(i)
- item = turtle.getItemDetail()
- print(" - Slot contains "..item.name)
- if item.name == itemName then
- return i
- end
- end
- return -1
- end
- function constructDigiminerComplex()
- print("Constructing digiminer complex...")
- digiminerSlot = findItemSlot(BLOCK_IDS.digiminer)
- tesseractSlot = findItemSlot(BLOCK_IDS.tesseract)
- --- place digiminer
- turtle.select(digiminerSlot)
- turtle.placeUp()
- --- place entangloporter
- turtle.forward()
- turtle.forward()
- turtle.up()
- turtle.select(tesseractSlot)
- turtle.placeUp()
- print(" Digiminer complex constructed. Homing...")
- --- return to start
- turtle.down()
- turtle.back()
- turtle.back()
- print(" Homed back to origin.")
- end
- gotoChunkCenter()
- constructDigiminerComplex()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement