Posted 08 July 2017 - 07:37 PM
So my code is:
But this part:
Btw i already changed the "or" to an "and" and i already switched the ~= to == and switched the redstone part with the other part (i also used "and" there)
shell.run("clear")
print("Working...")
turtle.select(1)
while true do
scs, block = turtle.inspect()
if scs == true then
if block.name ~= "flowing_lava" or block.name ~= "lava" then
turtle.dig()
turtle.select(16)
if turtle.compareDown() == false then
turtle.turnRight()
for f=1,16 do
turtle.select(f)
turtle.drop()
end
turtle.turnLeft()
end
turtle.select(1)
else
redstone.setOutput("top",true)
sleep(1)
redstone.setOutput("top",false)
sleep(2)
redstone.setOutput("top",true)
sleep(1)
redstone.setOutput("top",false)
end
end
end
I use this code with something frrom botania (another mc mod) where it makes stone to ores and the turtle is in front of a stone generator with lava and water. Now sometimes the lava flows in front of the water so i have to send a redstone output to a dispenser to get the lava back in or out if that happens.But this part:
if block.name ~= "flowing_lava" or block.name ~= "lava" then
doesnt really work, its always just keep switching to slot 1 and 16 but it should just do the redstone part there.Btw i already changed the "or" to an "and" and i already switched the ~= to == and switched the redstone part with the other part (i also used "and" there)
Edited on 08 July 2017 - 11:18 PM