Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isPlacable(slot)
- -- make sure there's nothing in the way
- if turtle.detect() then return "failed test" end
- turtle.select(slot)
- turtle.place()
- isThere = turtle.detect()
- turtle.dig()
- return(isThere)
- end
- function isSlotFull(slot,maxItems)
- turtle.select(slot)
- local count = turtle.getItemCount()
- local isF = maxItems >= count
- end
- function isBlock
- local fwd = turtle.detect()
- local up turtle.detectUp()
- if fwd then return fwd end
- if up then return up end
- end
- function isFull(maxFull)
- local slotsFull = 0
- for i = 1,16 do
- turtle.select()
- if turtle.getItemCount() > 0 then
- slotsFull = slotsFull + 1
- end
- end
- if slotsFull > maxFull then
- return slotsFull
- else
- return false
- end
- end
Add Comment
Please, Sign In to add comment