CCCPaste

mini_monsterfalle

turtle.forward()
local position = {}
position[0] = 0
position[1] = 1
local length = 10
local width = 11

local function dig_3_row()
	turtle.turnLeft()
	turtle.dig()
	turtle.turnRight()
	turtle.turnRight()
	turtle.dig()
	turtle.turnLeft()
end

local function mine_3_3(direction)
	turtle.dig()
	turtle.forward()
	dig_3_row()
	if direction == "l" then
		position[0] = position[0] + 1
	else
		position[1] = position[1] + 1
	end
	turtle.digUp()
	turtle.up()
	dig_3_row()
	turtle.down()
	turtle.digDown()
	turtle.down()
	dig_3_row()
	turtle.up()
end

function mine_room()
	print(turtle.detect())
	if not turtle.forward() then
    	print("Could not move forward!")
	end
end
function test()
	turtle.turnRight()
	turtle.turnRight()
	turtle.forward()
	turtle.turnLeft()
	for i = 0, length, 3 do
		for j = 0, width * 2, 1 do
			mine_3_3('w')
			if i == 0 and j == 10 then
				turtle.turnRight()
				turtle.turnRight()
				for k = 0, width, 1 do
					turtle.forward()
					position[1] = position[1] - 1
				end
			end
		end
		if i % 2 == 0 then
			turtle.turnLeft()
			turtle.turnLeft()
			turtle.forward()
			position[0] = position[0] - 1
			turtle.turnRight()
			mine_3_3()
			mine_3_3()
			turtle.turnLeft()
		else
			turtle.turnRight()
			turtle.turnRight()
			turtle.forward()
			position[0] = position[0] - 1
			turtle.turnLeft()
			mine_3_3()
			mine_3_3()
			turtle.turnRight()
		end
		print(position)
	end
end

mine_room()