RS Bridge causes Java NullPointerException when no Refined Storage network is attached
Descripe
Executing a lua function for the Rs Bridge peripheral without any Refined Storage network attached to it throws a java.lang.NullPointerException. Additionally, an error is thrown in the minecraft logs.
Expected behaviour is to return simply nil, possibly with a warning. The NullPointerException should not be shown in the server logs, but be catched.
Problem has been experienced on a server, not tested in singleplayer.
Steps to reproduce
- Place a computer next to an Rs Bridge, do not connect an Refined Storage network;
- Start the computer with an interactive lua prompt;
- Wrap the Rs Bridge as peripheral;
- Use any Refined-Storage-interfacing command, such as
listItems(); - A
java.lang.NullPointerExceptionis thrown.
Multiplayer?
Yes
Version
0.7.4r (Stable latest
Minecraft, Forge and maybe other related mods versions
Forge 36.2.0, Minecraft 1.16.5
Screenshots or Videos
https://snipboard.io/eb5hdg.jpg
Crashlog/log
https://pastebin.com/j3JAauXp
For 1.18 - I'll just return nil/0 if the network is not connected
I'll refactor this in 1.19/0.8. The result would then be false, "Network not connected"/true, 63(As example) or something similar.