Advanced Peripherals

Advanced Peripherals

29M Downloads

RS Bridge causes Java NullPointerException when no Refined Storage network is attached

Havaro opened this issue ยท 1 comments

commented

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

  1. Place a computer next to an Rs Bridge, do not connect an Refined Storage network;
  2. Start the computer with an interactive lua prompt;
  3. Wrap the Rs Bridge as peripheral;
  4. Use any Refined-Storage-interfacing command, such as listItems();
  5. A java.lang.NullPointerException is 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

commented

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.