Last active
September 4, 2021 20:46
-
-
Save ashap5/c9c61459c32863395b15f1a6ad9701b3 to your computer and use it in GitHub Desktop.
olo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blocksMovedUp = 0 | |
while true do | |
--refuel | |
if turtle.getFuelLevel() < 1000 then | |
for i = 1, 16 do | |
if turtle.getItemDetail(i).name == "minecraft:coal" then | |
turtle.select(i) | |
turtle.refuel() | |
print("refueling") | |
end | |
end | |
end | |
local success, data = turtle.inspect() | |
--mining | |
if data.name == "minecraft:log" then | |
turtle.dig() | |
turtle.digUp() | |
turtle.up() | |
blocksMovedUp = blocksMovedUp + 1 | |
print(blocksMovedUp) | |
elseif blocksMovedUp >= 0 then | |
turtle.down() | |
blocksMovedUp = blocksMovedUp - 1 | |
end | |
if data.name == "minecraft:sapling" then | |
turtle.select(15) | |
turtle.place() | |
else | |
print("som tu") | |
turtle.select(16) | |
turtle.place() | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment