How can I get the net data as a list?

Started by Alien, May 03, 2021, 07:27 pm

Previous topic - Next topic

Alien

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?
10 print "My name is Alien and I live in sweden"
20 print "My preferred programming language is java but python is fine too"
30 print "I have never used BESIC I just think its a good way to type this"

Lupus590

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 that lets you see the NBT anyways.

Alien

May 03, 2021, 09:05 pm #2 Last Edit: May 03, 2021, 09:07 pm by Alien
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?
10 print "My name is Alien and I live in sweden"
20 print "My preferred programming language is java but python is fine too"
30 print "I have never used BESIC I just think its a good way to type this"

Lupus590

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 stuff.

Alien

10 print "My name is Alien and I live in sweden"
20 print "My preferred programming language is java but python is fine too"
30 print "I have never used BESIC I just think its a good way to type this"