Posted 11 May 2017 - 09:39 AM
I am trying to currently code a working efficient mine straight down, but I can't get the code working for the block blacklists
Can you amazing people help me?
Minecraft version: 1.7.10 (Just incase the mod changed in versions)
--Once the code starts working I will add a fuel check
local b=0
local ignore={"minecraft:dirt","minecraft:stone","minecraft:cobblestone","minecraft:gravel","minecraft:sand"}
local function valuable()
success,data=turtle.inspect()
for k,v in pairs(ignore) do
if v~=data.name then
return true
else
return false
end
end
end
local function checkSurroundings()
for I=1,4 do
if valuable() then
turtle.dig()
end
turtle.turnLeft()
end
end
for I=1,2 do
turtle.digDown()
turtle.down()
b=b+1
end
turtle.select(15)
turtle.placeUp() --Place cobblestone over entry hole
turtle.select(1)
while true do
turtle.digDown()
if turtle.down() then
b=b+1
else
for I=1,b do
b=b-1
end
end
checkSurroundings()
end
Can you amazing people help me?
Minecraft version: 1.7.10 (Just incase the mod changed in versions)