Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- -----------------------------
- -- Humus crafter
- -- pastebin get bWRVZAqu startup
- -- -----------------------------
- -- directions:
- -- * front: empty (start position)
- -- * left: humus chest
- -- * back: dirt chest
- -- * right: compost chest
- -- * down: macerator
- -- * up: wheat chest
- function toStartPosition( )
- while turtle.detect() do
- turtle.turnLeft()
- end
- end
- function compressChest( item_type )
- turtle.select(13)
- if item_type == 'dirt' then
- turtle.suck()
- turtle.suck()
- turtle.drop()
- turtle.select(14)
- turtle.drop()
- else
- turtle.suckUp()
- turtle.suckUp()
- turtle.dropUp()
- turtle.select(14)
- turtle.dropUp()
- end
- end
- function suckAmount( slot_num, amount, item_type )
- toStartPosition()
- if item_type == 'dirt' then
- turtle.turnLeft()
- turtle.turnLeft()
- end
- compressChest( item_type )
- turtle.select(slot_num)
- while turtle.getItemCount(slot_num) < amount do
- if item_type == 'dirt' then
- turtle.drop()
- sleep(15)
- turtle.suck()
- else
- turtle.dropUp()
- sleep(15)
- turtle.suckUp()
- end
- end
- if turtle.getItemCount(slot_num) > amount then
- if item_type == 'dirt' then
- turtle.drop(turtle.getItemCount(slot_num) - amount)
- else
- turtle.dropUp(turtle.getItemCount(slot_num) - amount)
- end
- end
- end
- toStartPosition()
- for n=1,16 do
- turtle.select(n)
- turtle.drop()
- end
- while true do
- -- Craft 9 Plantballs
- suckAmount(1, 9, 'wheat')
- suckAmount(2, 9, 'wheat')
- suckAmount(3, 9, 'wheat')
- suckAmount(5, 9, 'wheat')
- suckAmount(7, 9, 'wheat')
- suckAmount(9, 9, 'wheat')
- suckAmount(10, 9, 'wheat')
- suckAmount(11, 9, 'wheat')
- turtle.select(15)
- turtle.craft()
- while not turtle.dropDown() do
- sleep(15)
- end
- -- Craft 32 compost
- suckAmount(6, 8, 'dirt')
- suckAmount(2, 8, 'wheat')
- suckAmount(5, 8, 'wheat')
- suckAmount(7, 8, 'wheat')
- suckAmount(10, 8, 'wheat')
- turtle.select(6)
- turtle.craft()
- toStartPosition()
- turtle.turnRight()
- while not turtle.drop(24) do
- sleep(15)
- end
- turtle.turnLeft()
- -- Craft 64 humus
- suckAmount(1, 8, 'dirt')
- suckAmount(2, 8, 'dirt')
- suckAmount(3, 8, 'dirt')
- suckAmount(5, 8, 'dirt')
- suckAmount(7, 8, 'dirt')
- suckAmount(9, 8, 'dirt')
- suckAmount(10, 8, 'dirt')
- suckAmount(11, 8, 'dirt')
- turtle.select(15)
- turtle.craft()
- toStartPosition()
- turtle.turnLeft()
- while not turtle.drop() do
- sleep(15)
- end
- turtle.turnRight()
- sleep(30)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement