Monday, November 18, 2013

Minecraft
ComputerCraft/Feed The Beast Code
STRAIGHT HOLE DOWN / THAT CANINDIAN

ComputerCraft is a mod for Minecraft that allows you to program computers called turtles to do work for you. Feed The Beast is a mod pack for Minecraft that has the ComputerCraft mod in it.

I created this code that makes a straight hole downwards while making it secure and filling in any exposed places. I did, though, get the idea from a video I watched. All you have to do is type (name of program) (depth). 

local tArgs = {...}
local todo = tonumber(tArgs[1])
local sslot = 1

function checkSlot()
turtle.getItemCount(sslot)
while turtle.getItemCount(sslot) < 1 do
sslot = (sslot%16)+1
  end
end

for i = 1, todo do

if turtle.detectDown() == true then
turtle.digDown()
turtle.down()

else

turtle.down()

end

for k = 1, 4 do

if turtle.detect() == true then
checkSlot()
turtle.turnRight()

else

checkSlot()
turtle.place()
turtle.turnRight()

    end
  end
end

for j = 1, todo do
turtle.up()


end

No comments:

Post a Comment