Advanced Peripherals

Advanced Peripherals

29M Downloads

[Issue] Exporting items with nbt data not possible with me-bridge

LuckyTeran opened this issue ยท 4 comments

commented

Minecraft version: 1.16.5
Forge version: 36.0.42
AdvancedPeripherals version: 0.3.10b

I tried to export a enchanted book with a me-bridge into a chest.
'listItems()' shows:
{ { amount = 1, displayName = "Enchanted Book", name = "minecraft:enchanted_book", nbt = "{StoredEnchantments:[{lvl:1s,id:\"minecraft:mending\"}]}" } }

exporting with 'exportItem("minecraft:enchanted_book",1,"down")' gives the following error:
Item minecraft:enchanted_book does not exist in the ME system or the system is offline

I can export other items with the same setup no problem. I also have problems with other items and they all have in common that they have nbt data and AE2 lists them as different items with the same name.

Other mods use some kind of hash over the nbt data do differentiate between those items and sometimes give the option to ignore nbt data completely. For example here, here. One solution would be to use the normal name like now to extract items while ignoring the nbt data so already written programs don't break but use something like this to extract specific items. To use this 'listItems()' needs an entry with the hash for every item in the system.

commented

Added in eaaeb28 . I will upload 0.4b tomorrow, I need to create the documentation.

commented

Could you show me your script?

commented

Sure thing: https://pastebin.com/KW13d76n

It's a bit dirty atm but the call to exportItem is made line 21. I also tested exportItemToChest with the same results.

commented

It seems to still not be working for me on version 0.4.3.1b.

I made a quick script to sort items for my RS system. It works with cables for example but won't work for any armor piece or tools.

Haven't tested with an AE system.