View difference between Paste ID: 9ktAHC8j and QvdkhT9y
SHOW: | | - or go back to the newest paste.
1
while true do 
2
hauteur=0
3
block = turtle.detect()
4
local succes,data = turtle.inspect()
5
print(data.name)
6
print(block)
7
sleep(1)
8
if (block == true) and (data.name ~="minecraft:sapling") then 
9
    print("lol")
10
    while block ==true do
11
    block = turtle.detect()
12
    turtle.dig()
13
    turtle.up()
14
    turtle.digUp()
15
    hauteur=hauteur+1
16
    print(hauteur)
17
    end
18
end
19
if block ==false then
20
    while hauteur~=0 do 
21
       turtle.down()
22
      hauteur=hauteur-1
23
      print(hauteur)
24
      end
25
end
26
end