Advanced Peripherals

Advanced Peripherals

29M Downloads

MeBridge do not transfer items with NBT correctly

adamsonich opened this issue ยท 1 comments

commented

Describe

        json1=textutils.serializeJSON(Item ["nbt"]["tag"])
        ItemCount=peripheral.call(side,"exportItem",{name=Item ["name"], count=1, json = json1},"up")
        ItemCount=peripheral.call(side,"exportItem",{name=Item ["name"], count=1, nbt=Item ["nbt"]},"up")
        ItemCount=peripheral.call(side,"exportItem",{name=Item ["name"], count=1, nbt=Item ["nbt"]["tag"]},"up")

All 3 version do not transfer items with NBT Item ["nbt"]["tag"]["Enchantments"] correctly
If item has something like Item["nbt"]["tag"]["Damage"], it work perfect.

By deep holing https://github.com/SirEndii/AdvancedPeripherals/blob/89e71fa2368f9004017c4c0b1037a3e0a2532a20/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/MeBridgePeripheral.java#L70
I found: https://github.com/SirEndii/AdvancedPeripherals/blob/89e71fa2368f9004017c4c0b1037a3e0a2532a20/src/main/java/de/srendi/advancedperipherals/common/util/ItemUtil.java#L65

table.containsKey("fingerprint")

(I said a lot of bad russian words in that place and that moment)

This code is working correctly and perfect:

ItemCount=peripheral.call(side,"exportItem",{name=Item ["name"], count=1, fingerprint=Item ["fingerprint"]},"up")
ItemCount=peripheral.call(side,"exportItem",{count=1, fingerprint=Item ["fingerprint"]},"up")

Steps to reproduce

/

Multiplayer?

No

Version

1.18.2-0.7.20r (Latest 1.18)

Minecraft, Forge and maybe other related mods versions

forge 40.1.84 minecraft 1.18.2

Screenshots or Videos

No response

Crashlog/log

No response

commented

I'm having this issue as well, specifically with importItemFromPeripheral, the item is successfully imported but it seems to be removing NBT data in the process. I've experienced this with the ae2:facade and hostilenetworks:prediction specifically.

Modpack: ATM8 v1.0.7
Mod Version: 0.7.22b
Minecraft Version: 1.19.2