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

Querying a turtle's inventory

Started by rockobonaparte, 08 February 2014 - 12:52 AM
rockobonaparte #1
Posted 08 February 2014 - 01:52 AM
Just to verify: Is there a way in the core API to check the item in a turtle's slot? I see I can compare selected inventory to the environment, but I don't see anything where I can see if my selected inventory matches a certain block ID. I was hoping to make an autobuilder that can take a pile of the materials I had assigned from the data file and just kind of figure it out. The most clever thing I could come up with was giving it a chest that it could place down. With that, it can dump its whole inventory inside, sort it all, query it all, and then put it back into its inventory after identifying everything. That seems pretty goofy, but it's all I could figure out.
Goof #2
Posted 08 February 2014 - 02:21 AM
to complete your "problem" you have to use an item which the turtle already has in its inventory, so it can compare if these blocks / items matches.


another post with almost the same question about the turtle item detection thingy
Turtles are supposed to be blind, hand-less golems that can only move around and bash things mindlessly.

In your case you can tell the player or whatever, to input the things in a correct order, so the turtle can use it in the same order and therefore "autobuild" the construction
Edited on 08 February 2014 - 01:21 AM