Advanced Peripherals

Advanced Peripherals

29M Downloads

meBridge.exportItem(item: table, direction: string) returns 0 NO_VALID_NBT

TrickShotMLG02 opened this issue · 5 comments

commented

Describe

I am using v0.7.24b of OpenPeripherals on Forge 1.19.2-43.2.6. In addition i have ae2 v12.9.2 installed.
with the older version of OP (v0.7.22b) the script below worked fine, but now i get some weird errors when i try to export an item from the me system into a chest above the me bridge. I am able to see get the item name ect, but i cant export it. I have never seen the error 0 NO_VALID_NBT before. Also note, that no items are added to the me while running the code.

There is also no error on the server console.

local ae2 = peripheral.find("meBridge")
local items = ae2.listItems()
print(#items)
for _, item in ipairs(items) do
  print(item.name)
  print(ae2.exportItem(item, "up"))
  os.sleep(0.5)
end

image

image

image

Anybody got an idea how to fix that?

Steps to reproduce

Try exporting all items from a me-system by grabbing all items from meBridge and exporting them in a loop.

Multiplayer?

Yes

Version

1.19.2-0.7.24b (Latest 1.19.2)

Minecraft, Forge and maybe other related mods versions

43.2.6

Screenshots or Videos

No response

Crashlog/log

No response

commented

Similar issue to this → #416

So the thing is, the stacks returned from listCraftableItems can't be parsed by the filter. The nbt tag is not formerly formatted for that

image

What you could do is setting the nbt value to nil like stated here →

image

I was able to fix that by trying to parse a table if parsing a string does not work. However, I would still recommend setting the nbt value to nil in case something is off with the nbt values.

image

commented

I dont think it is the same problem, since i can‘t specify any nbt data in the export Item method.

exportItem(item: table, direction: string) -> number, err: string

or am i wrong about this?

commented

The table argument is a filter. The filter tries to parse the NBT value as a string (a value surrounded by ")
But the item which is returned by listItems returns items with a nbt key as a table, not a string. The new update fixed that.

You can read about the new filter system here → https://docs.intelligence-modding.de/guides/filters/
And here → https://docs.intelligence-modding.de/changelogs/0.7.24r/#itemfluid-filter

commented

where can i get the new update? i am unable to find a newer version of Advanced Peripherals for 1.19.2

commented

This update isn't published yet