ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: Alien on May 03, 2021, 07:27 PM

Title: How can I get the net data as a list?
Post by: Alien on May 03, 2021, 07:27 PM
I'm trying to make a program that can work with one or more chests to have a system of "sorting" enchanted books but when I run this code
```
chest = peripheral.wrap(sideOfChest)
items = chest.list()
items[idForEnchatenBook].nbt
```
from this I get a string that's just rubel for me and I wonder do it exist an inbuilt api or have someone made an api to get the nbt data as a list?
Title: How can I get the net data as a list?
Post by: Lupus590 on May 03, 2021, 08:51 PM
Some mods can put data into the NBT that they don't want the player to know, so CC hashes the NBT to prevent players from seeing that data.

I don't know what MC version you are on but you could try this NBT peripheral (https://www.curseforge.com/minecraft/mc-mods/nbt-peripheral) that lets you see the NBT anyways.
Title: How can I get the net data as a list?
Post by: Alien on May 03, 2021, 09:05 PM
Thx I uses 1.16 I missed to say that but it was listed
and dos it works for chest, is it server only/client only(probably not) or both?
Title: How can I get the net data as a list?
Post by: Lupus590 on May 03, 2021, 10:13 PM
I'm fairly sure that the mod adds a block, so it will need to be installed on both the client and the server. I believe that the item needs to be put into the peripheral, but you should be able to automate that with the generic peripheral (https://tweaked.cc/generic_peripheral/inventory.html) stuff.
Title: How can I get the net data as a list?
Post by: Alien on May 04, 2021, 08:07 AM
thx