Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
The FTB Forum is now read-only, and is here as an archive.
To participate in our community discussions, please join our Discord! https://ftb.team/discord
The excavate program included in the mod kind of does that already. Look into the zip file of CC, go to lua\rom\programs\turtle and open it. Learn from the code.
Another option would be to use GPS (save the chest coords and return to there, when your 16th slot starts to fill).
if you want to drop everything into a chest above, here is a little piece of code that does just that (also checks if inventory is "full" (well, not exactly, but very close):
Code:
if (turtle.getItemCount(16)) then
for i=16, 1, -1 do
turtle.select(i)
turtle.dropUp()
end
end
Note that it does it the reverse way, so that it starts to fill up slot 1 again after that.
Hope that it is what you asked.