Advanced Peripherals

Advanced Peripherals

29M Downloads

exportItemToPeripheral() can't export Item to inventory that attached to wired modems

pxsleep opened this issue · 1 comments

commented

Describe

ME Bridge
when i use brigeexportItemToPeripheral(), it can export Item to inventory on the computer,but there is an error when export Item to inventory that attached to wired modems.

this is my code.

local bridge = peripheral.wrap("back")
if bridge == nil then error("meBridge not found") end
for _, name in ipairs(peripheral.getNames()) do
print(name)
end
local num
num = bridge.exportItemToPeripheral({ name = "minecraft:flint", count = 10 }, "top")
print(num)
num = bridge.exportItemToPeripheral({ name = "minecraft:flint", count = 10 }, "minecraft:chest_0")
print(num)

微信截图_20230609160823

The mod version is AdvancedPeripherals-1.18.2-0.7.30r.

Steps to reproduce

num = bridge.exportItemToPeripheral({ name = "minecraft:flint", count = 10 }, "top") is ok,
num = bridge.exportItemToPeripheral({ name = "minecraft:flint", count = 10 }, "minecraft:chest_0") is not ok

Multiplayer?

No

Version

1.18.2-0.7.29r (Latest 1.18.2)

Minecraft, Forge and maybe other related mods versions

Forge 40.2.9 Minecraft 1.18.2

Screenshots or Videos

No response

Crashlog/log

No response

commented

It's because you didn't connected the bridge via the network.
The bridge can't access peripherals in the wired network if it's wrapped via a side like back or east
You need to connect the bridge via a modem and the network name like meBridge_0