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

Turtle getting item names

Started by ZephyrWolf_, 15 October 2015 - 07:33 AM
ZephyrWolf_ #1
Posted 15 October 2015 - 09:33 AM
Ok, pretense, I hope this is the right place to put this, but I cant seem to add a post to anywhere else and I can find anything online… so here I am.

So turtles can hold items and gain information about them, fantastic. It can get the uuid, metadata, string name and from this can do alot. My question is if i was to rename a stick to "foo" using an anvil, is there anyway I can retrieve this name. currently the best I can do is something like "Minecraft:Stick" which doesn't help. If this isn't possible could someone add this as a suggestion, it wont let me.

I will accept any help, code wise or suggestions towards peripheral addons.

thanks for reading
Bomb Bloke #2
Posted 15 October 2015 - 10:20 PM
On its own, you can't do this with ComputerCraft. The add-on mod OpenPeripheral does allow you to wrap most containers (chests etc) as peripherals, and then by calling eg chest.getStackInSlot(slotNum) you'll be handed a table with fair more information in it.

OpenPeripheral also allows you to craft Narcissistic Turtles, which are able to call getStackInSlot() on their own internal inventory.
ZephyrWolf_ #3
Posted 16 October 2015 - 02:40 AM
Thanks, that actually helps, its working now ^_^/> appriciate it alot :)/>