Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --to use place inventory with oak logs or bowls above a crafty turtle, a target inventory below and a mooshroom in front
- function CraftBowl(item)
- --adding some additional checks in case the loop is interrupted while crafting
- if item.name == "minecraft:oak_log" then
- if item.count == 3 then
- turtle.craft(3)
- else
- turtle.suckUp(3 - item.count)
- end
- elseif (item.name == "minecraft:oak_planks") and (item.count % 4 == 0) then
- if item.count == 12 then
- turtle.transferTo(3,4)
- elseif item.count == 8 then
- turtle.transferTo(6,4)
- elseif item.count == 4 then
- turtle.craft(4)
- end
- else
- print("Something went wrong, empty inventory and try again.")
- end
- end
- while true do
- item = turtle.getItemDetail(1)
- if turtle.getItemCount(2) > 0
- turtle.select(2)
- turtle.dropDown()
- end
- turtle.select(1)
- if item == nil then
- turtle.suckUp(3)
- elseif item.name == "minecraft:bowl" then
- turtle.place()
- elseif item.name == "minecraft:mushroom_stew" then
- turtle.dropDown()
- else
- CraftBowl(item)
- end
- os.sleep(.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement