Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --slot 1 reserved for fuel.
- --slot 2 reserved for torches
- --slot 3-16 reserved for cobblestone
- -- Designed chunk placement in FTB Infinity Skyblocks
- -- TESTING
- currentSlot = 1
- rowCount = 1
- run=1
- function Refuel()
- print("Current Fuel Level: " .. turtle.getFuelLevel())
- if turtle.getFuelLevel() < 200 then
- turtle.select(1)
- while turtle.getItemCount(1) > 0 and turtle.getFuelLevel() < 200 do
- turtle.refuel(1)
- end
- if turtle.getFuelLevel() < 200 then
- print("Need Fuel! Place fuel in slot 1, 10 minimum")
- run=0
- else
- print("Refueled, new level" .. turtle.getFuelLevel())
- end
- end
- end
- function Supplies()
- sumCount=0
- for i = 3, 16 do
- sumCount=sumCount+turtle.getItemCount(i)
- end
- if sumCount>=256 then
- print("New Supplies Level: " .. sumCount)
- else
- print("Need supplied to place in slot 3 through 16!")
- run=0
- end
- end
- function Torches()
- if turtle.getItemCount(2)>=16 then
- print("Torch Level: " .. turtle.getItemCount(2))
- else
- print("Need torches placed in slot 2!")
- run=0
- end
- end
- function gridSupplies()
- Refuel()
- Supplies()
- Torches()
- end
- function place()
- Supplies()
- if run==0 then return 0 end
- for i = 3, 16 do
- if turtle.getItemCount(i)>0 then
- turtle.select(i)
- break
- end
- end
- turtle.placeDown()
- end
- function placeChunk()
- gridSupplies()
- if run == 0 then return 0 end
- for c=0,15 do
- for r=0,15 do
- if run==0 then return 0 end
- if r==0 then
- turtle.forward()
- if not (c%2==0) then
- turtle.forward()
- end
- end
- place()
- if r%4==0 and c%4==0 then
- --needs a torch
- turtle.up()
- turtle.select(2)
- turtle.placeDown()
- turtle.forward()
- turtle.down()
- else
- turtle.forward()
- end
- end
- if c%2==0 then
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- -- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- run=run-1
- end
- run=2
- while run > 0 do
- placeChunk()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement