-- Living Block Harvest (LBH)

-- Fuel turtle, fill with smooth stone or logs

-- leave one slot empty

-- set turtle next to pure daisy

-- run whatever you saved the program as

livingwood = "Botania:livingwood"

livingrock = "Botania:livingrock"

pureDaisy = "Botania:specialFlower"

baserock = "minecraft:stone"

baselog = "minecraft:log"

baselog2 = "minecraft:log2"

function checkBaseMaterial ( description )

if description == baserock or description == baselog or description == baselog2 then

return true

else

return false

end

end

function checkLivingMaterial ( lDescription )

if lDescription == livingwood or lDescription == livingrock then

return true

else

return false

end

end

function searchInventory ( )

for slot = 1 , 16 do

deets = turtle . getItemDetail ( slot )

if deets then

if checkBaseMaterial ( deets . name ) then

return slot

end

end

end

end

function tend ( )

anythingThere , item = turtle . inspect ( )

if checkLivingMaterial ( item . name ) then

turtle . dig ( )

turtle . select ( searchInventory ( ) )

turtle . place ( )

elseif anythingThere == false then

turtle . select ( searchInventory ( ) )

turtle . place ( )

elseif checkBaseMaterial ( item . name ) then

end

end

function main ( )

anythingThere , item = turtle . inspect ( )

facingFlower = ( item . name == pureDaisy and true or false )

while facingFlower == false do

turtle . turnLeft ( )

anythingThere , item = turtle . inspect ( )

facingFlower = ( item . name == pureDaisy and true or false )

end

while true do

turtle . turnLeft ( )

tend ( )

turtle . turnRight ( )

turtle . turnRight ( )

tend ( )

turtle . turnLeft ( )

sleep ( 15 )

end

end