Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Variables
- local length = 1000 -- Tunnel length
- local paveBlock = "minecraft:netherrack" -- Replace with your block of choice
- local width = 3 -- Tunnel width (each turtle handles part)
- -- Function to place block below
- local function pave()
- if turtle.detectDown() == false then
- turtle.select(1) -- Ensure the first slot has the pave block
- turtle.placeDown()
- end
- end
- -- Function to dig forward and pave below
- local function digAndMove()
- turtle.dig()
- turtle.forward()
- pave()
- end
- -- Main function
- local function digTunnel()
- for i = 1, length do
- digAndMove()
- if i % 125 == 0 then
- print("Reminder: Place portal at this location.")
- end
- end
- end
- -- Prepare the turtle
- local function prepare()
- print("Loading...")
- turtle.select(1) -- Make sure the correct block is in slot 1
- turtle.refuel() -- Ensure the turtle has enough fuel
- end
- -- Start digging
- prepare()
- digTunnel()
- print("Tunnel complete!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement