This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Blockerville's profile picture

Is there a way to retrieve items from chests using a computer?

Started by Blockerville, 14 June 2014 - 02:42 AM
Blockerville #1
Posted 14 June 2014 - 04:42 AM
Basically, here's what I envision:

A bank of chests, filled with random stuff I find on my adventures. I could organize the chests by material type, but having a different chest for every item sounds kind of terrible, so I don't want to do that.

Anyway, connected to those chests would be a series of BuildCraft pipes, that all lead to one place.

Next to that place, there would be a computer. A user of the computer would simply be able to type in the name of the item they want and the quantity, and it would momentarily arrive at the place where the pipe ends. The user could pick up the item they need, and go off and use it as they feel.

Is there any way to do this?
theoriginalbit #2
Posted 14 June 2014 - 04:54 AM
Yes it is definitely possible.

A ComputerCraft only setup is a little complicated, requiring Turtles under every chest and requiring a different chest for every item.

However if you have OpenPeripheral installed it is definitely very easy to do this, you can fill a chest with anything you want. you then simply wrap each chest, call the getAllStacks on them, and loop through the table this returns, if you then find the item you're after you just use pushItem to place the item in the buildcraft pipe… as long as you setup the buildcraft pipe correctly the item would then travel the entire way to the chest for the person to get the item.

EDIT: okay so after some testing, the buildcraft pipes aren't actually valid targets for OpenPeripheral to push items into, which would result in you needing to create a setup like this
Edited on 14 June 2014 - 03:37 AM
Lyqyd #3
Posted 14 June 2014 - 05:18 AM
This is a perfectly legitimate thing to want to do with just ComputerCraft and BuildCraft, but just in case you don't already know about it, Applied Energistics is a good mod to look in to for automated storage and retrieval. Logistics Pipes is also another good one.
Blockerville #4
Posted 14 June 2014 - 04:37 PM
This is a perfectly legitimate thing to want to do with just ComputerCraft and BuildCraft, but just in case you don't already know about it, Applied Energistics is a good mod to look in to for automated storage and retrieval. Logistics Pipes is also another good one.

Interesting, I'll look into those mods. Thanks for your help.