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

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

Loading…
Cancel
Save