Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- **** READ ME ****
- -- Version 1.01
- -- **** Purpose ****
- -- Designed for path building in
- -- FTB Infinity Evolved Skyblock
- -- to connect the "Islands" using a turtle
- -- example: 2000 blocks apart with VOID below.
- --
- -- **** Actions ****
- -- The turtle will continue straight forward,
- -- building the path as long as it has enough
- -- resources in it to do another set of 4 rows.
- -- 20 cobble in a stack, at least 1 torch and
- -- at least enough fuel to move 20 spaces.
- --
- -- **** Layout ****
- -- C = Cobblestone (or any place-able block)
- -- T = Torch (Note only placed every 4 rows)
- -- S = Starting Location
- -- Side View Top View
- -- T TCCCC
- -- C C S
- -- CCC
- --
- -- **** Known bugs/inefficiencies ****
- -- 1) Cobble usage needs a tweak, it leaves small
- -- stacks in the slots if they are less than 20.
- -- 2) Fuel consumption/usage needs a small tweak,
- -- currently it consumes the whole stack in slot
- -- 1, instead of just enough to do a cycle
- --
- -- **** SETUP ****
- -- Place turtle where you want the left walk way to be.
- --
- -- Add resources:
- -- slot 1 reserved for fuel.
- -- slot 2-15 reserved for cobblestone
- -- slot 16 reserved for torches
- --
- -- **** END README ****
- currentSlot = 2
- rowCount = 1
- run=1
- function refuel()
- print("Current Fuel Level: " .. turtle.getFuelLevel())
- if turtle.getFuelLevel() < 20 then
- turtle.select(1)
- if turtle.getItemCount(1) < 20 then
- print("Need Fuel! Place fuel in slot 1, 10 minimum")
- run=0
- else
- turtle.refuel(turtle.getItemCount(1))
- print("Refueled, new level" .. turtle.getFuelLevel())
- end
- end
- end
- function cobbleSupplies()
- if turtle.getItemCount(currentSlot)>=20 then
- print("Current Cobblestone Level: " .. turtle.getItemCount(currentSlot))
- else
- for i = 2, 15 do
- currentSlot = i
- if turtle.getItemCount(i)>=20 then
- turtle.select(currentSlot)
- print("New Cobblestone Level: " .. turtle.getItemCount(currentSlot))
- return 0
- end
- end
- end
- if (currentSlot == 15 or turtle.getItemCount(currentSlot) <20) then
- print("Need Cobblestone in slot 2 through 15, add at least 10 a slot!")
- currentSlot = 2
- run=0
- end
- end
- function torches()
- print("Current Torch Level: " .. turtle.getItemCount(16))
- if turtle.getItemCount(16) < 1 then
- print("Need to add at least 1 torch, to slot 16!")
- run=0
- end
- end
- function gridSupplies()
- refuel()
- cobbleSupplies()
- torches()
- end
- function placeGrid()
- gridSupplies()
- if run == 0 then return 0 end
- turtle.select(currentSlot)
- turtle.forward()
- turtle.placeDown() -- Left path block - row 1
- turtle.turnLeft() -- Pointing Left
- turtle.place() -- Left Guide 1
- turtle.turnRight() -- turn around
- turtle.turnRight()
- turtle.forward() -- move one to the right
- turtle.placeDown() -- Left path block - row 1
- turtle.forward() -- move one to the right
- turtle.placeDown() -- center path block - row 1
- turtle.place() -- right Guide 1
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown() -- Left path block - row 2
- turtle.turnRight()
- turtle.place() -- Right Guide 2
- turtle.turnLeft() -- turn around
- turtle.turnLeft()
- turtle.forward() -- move one to the right
- turtle.placeDown() -- Left path block - row 2
- turtle.forward() -- move one to the right
- turtle.placeDown() -- center path block - row 2
- turtle.place() -- Left Guide 2
- turtle.turnRight()
- turtle.forward()
- turtle.placeDown() -- Left path block - row 3
- turtle.turnLeft() -- Pointing Left
- turtle.place() -- Left Guide 3
- turtle.turnRight() -- turn around
- turtle.turnRight()
- turtle.forward() -- move one to the right
- turtle.placeDown() -- Left path block - row 3
- turtle.forward() -- move one to the right
- turtle.placeDown() -- center path block - row 3
- turtle.place() -- right Guide 3
- turtle.turnLeft()
- turtle.forward()
- turtle.placeDown() -- Left path block - row 4
- turtle.turnRight()
- turtle.place() -- Right Guide 4
- turtle.turnLeft() -- turn around
- turtle.turnLeft()
- turtle.forward() -- move one to the right
- turtle.placeDown() -- Left path block - row 4
- turtle.forward() -- move one to the right
- turtle.placeDown() -- center path block - row 4
- turtle.place() -- Left Guide 4
- -- place a torch
- turtle.select(16)
- turtle.up()
- turtle.place()
- turtle.down()
- turtle.select(currentSlot)
- turtle.turnRight()
- end
- while run == 1 do
- placeGrid()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement