Advanced Peripherals

Advanced Peripherals

29M Downloads

ME Bridge Adds Empty NBT Tag on importFromPeripheral

twhickey opened this issue ยท 1 comments

commented

Describe

When using the ME Bridge, importFromPeripheral adds an empty NBT tag (named tag) to the NBT data. This causes the imported item to be stacked separately from the original.

Steps to reproduce

  1. Setup an AE2 system with storage, an ME Bridge, and an inventory. Connect a computer to the ME Bridge and Inventory via modem.
  2. Examine an item in the AE2 storage, observe the NBT Tags
me.getItem({name = "gtceu:raw_coal"})
{
  tags = {
    "minecraft:item/forge:raw_materials/coal",
    "minecraft:item/forge:raw_materials",
  },
  name = "gtceu:raw_coal",
  amount = 3996298,
  fingerprint = "62CF3CC83F29DFABEE499DB11DF0F18A",
  isCraftable = false,
  nbt = {
    id = "gtceu:raw_coal",
  },
  displayName = "Raw Coal",
}
  1. Export some of the item to the inventory
    me.exportToPeripheral({name = "gtceu:raw_coal", count = 32}, peripheral.getName(inventory))
  2. Observe the item in the inventory with getItemDetail, note that the NBT is still correct
inventory.getItemDetail(1)
{
  name = "gtceu:raw_coal",
  itemGroups = {},
  tags = {
    [ "forge:raw_materials" ] = true,
    [ "forge:raw_materials/coal" ] = true,
  },
  count = 32,
  maxCount = 64,
  displayName = "Raw Coal",
}
  1. Import back into AE2 with importFromPeripheral
    me.importFromPeripheral({name = "gtceu:raw_coal", count = 32}, peripheral.getName(inventory))

  2. Observe the item in the ME system, note that it now has an empty tag = {} NBT tag

me.getItem({name = "gtceu:raw_coal"})
{
  tags = {
    "minecraft:item/forge:raw_materials/coal",
    "minecraft:item/forge:raw_materials",
  },
  name = "gtceu:raw_coal",
  amount = 32,
  fingerprint = "62CF3CC83F29DFABEE499DB11DF0F18A",
  isCraftable = false,
  nbt = {
    id = "gtceu:raw_coal",
    tag = {},
  },
  displayName = "Raw Coal",
}

Multiplayer?

Yes

Version

1.20.1-0.7.37r (Latest 1.20.1)

Minecraft, Forge and maybe other related mods versions

Forge 47.2.20 Minecraft 1.20.1

Screenshots or Videos

No response

Crashlog/log

No response

commented

Note - mod version is actually 0.7.38r, but that wasn't available in the dropdown. CC:Tweaked version is 1.109.5.

If it matters, I'm playing the ATM9 modpack