Scripts
local function replace_or_place_block( direction )
if direction == "up" then
if turtle.detectUp() then
if ( not(turtle.compareUp()) ) then turtle.digUp() turtle.placeUp()
end
else turtle.placeUp()
end
elseif direction == "down" then
if turtle.detectDown() then
if ( not(turtle.compareDown()) ) then turtle.digDown() turtle.placeDown()
end
else turtle.placeDown()
end
elseif direction == "forward" then
if turtle.detect() then
if ( not(turtle.compare()) ) then turtle.dig() turtle.place()
end
else turtle.place()
end
else
throw("Invalid direction")
end
end
local function buildFloor(length, width)
for w = 1, width do
for l = 1, length do
end
end
end
return {floorBuilder = buildFloor}
Välkommen till
Gabriel Wrede