Minecraft
ComputerCraft/Feed The Beast Code
MAKE A FLOOR / 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 made this program from scratch that makes a floor for you out of any type of material. All you have to do is type (name of program) (length) (width)
local tArgs = {...}
local todo = tonumber(tArgs[1])
local width = tonumber(tArgs[2])
local sslot = 1
function checkSlot()
turtle.getItemCount(sslot)
while turtle.getItemCount(sslot) < 1 do
sslot = (sslot%16)+1
turtle.select(sslot)
end
end
for j = 1, width / 2 do
for i = 1, todo do
if turtle.detectDown() == true then
turtle.dig()
checkSlot()
turtle.digDown()
turtle.placeDown()
turtle.forward()
else
turtle.dig()
checkSlot()
turtle.placeDown()
turtle.forward()
end
end
turtle.turnRight()
if turtle.detect() == true then
turtle.dig()
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
else
turtle.forward()
turtle.turnRight()
turtle.dig()
turtle.forward()
end
for i = 1, todo do
if turtle.detectDown() == true then
turtle.dig()
checkSlot()
turtle.digDown()
turtle.placeDown()
turtle.forward()
else
turtle.dig()
checkSlot()
turtle.placeDown()
turtle.forward()
end
end
turtle.turnLeft()
if turtle.detect() == true then
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
else
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.forward()
end
end
turtle.turnLeft()
for i = 1, width do
turtle.forward()
end
turtle.turnRight()
No comments:
Post a Comment