Fix placing torches

master
D4VID 10 months ago
parent 93ecf28013
commit 2e03f26861

@ -30,7 +30,7 @@ local function mine_n(count, place_torches)
-- place a torch every 11 blocks to keep the tunnel lit
if i % 11 == 0 and place_torches then
torch.place_torch(sides.west)
torch.place_torch(sides.right)
end
end
return mined
@ -67,7 +67,7 @@ local function mine(scan_depth)
-- place a torch every 11 blocks to keep the tunnel lit
if moved_rows % 11 == 0 then
torch.place_torch(sides.north)
torch.place_torch(sides.left)
end
if mine_n(1, false) ~= 1 then
@ -75,7 +75,6 @@ local function mine(scan_depth)
break
end
moved_rows = moved_rows + 1
end
-- go back to start

@ -10,7 +10,9 @@ local function place_torch(side)
if stack.name == "minecraft:torch" then
robot.select(1)
robot.placeUp(side)
if not robot.placeUp(side) then
print('Failed to place torch')
end
else
print('Out of torches')
end

Loading…
Cancel
Save