For the sake of writing fast turtle programs, I am wondering how, in relation to ticks, is code executed? Is there a tick penalty for executing functions or evaluating other Lua statements in addition to the time it takes the turtle to move? In other words, does it take the same amount of time to do this (assuming the if statements evaluate to false):
turtle.forward()
if turtle.getFuelLevel() == 0 then turtle.refuel() end
turtle.forward()
this:
turtle.forward()
if x < 20 then turtle.refuel() end
turtle.forward()
x = x+1
and
turtle.forward()
turtle.forward()
? Thanks
Edit:
According to Eric, anything that interfaces with Minecraft could take a tick, but operations that are raw Lua will not. In other words, the first example takes 2 extra ticks (in addition to the multi-tick move), the second takes 1 extra tick, and the final has no extra ticks.