NullPointer Exception while using ME bridge
IICarst opened this issue · 2 comments
Describe
When you use the exportItemToPeripheral function on the ME Bridge it will sometimes throw a java exception.
I suspect it has something to do with the me not being loaded.
This could easily be fixed by adding a check on the inventory variable in the function and throw either a lua exception when its null or return false or something like that.
Steps to reproduce
Connect an ME Bridge to a quantum bridge that is connected to a me system.
first make sure the system is loaded and try to export items from the system to another peripheral.
then unload the system and try again. It should fail this time.
Multiplayer?
Yes
Version
1.19.2-0.7.30r (Latest 1.19.2)
Minecraft, Forge and maybe other related mods versions
Forge 43.2.8 Minecraft 1.19.2
Screenshots or Videos
No response
Crashlog/log
No response
I am not able to reproduce this due to a lack of information
But I assume that it has something to do with a known "issue" with wrong usage of peripherals in computercraft.
I am going to quote someone from discord.
In case you have no idea what I am talking about, let me explain: CC actually has a sort of subnetting system, which means only things connected via cable are actually connected to each other.
In this case, you can imagine the networking cable as an item pipe: When you try to move items form A to B you can only move them to connected inventories. If you have a cable to an inventory on the left side of the computer and another one on the right side that aren't connected via cable to each other, you can't move items between them because they would have to go from the left cable through the computer into the right one which is not allowed.
I've added some warnings to prevent Null Pointer Exceptions. You can try the snapshots if you want