AE2 Stuff

AE2 Stuff

53M Downloads

Crash with wireless connector in rv3 version

BakermanLP opened this issue ยท 8 comments

commented

I got an error in your rv3 version (latest from jenkins). I tried to right click the wireless connector with the wireless setup kit and minecraft crashed.

Used versions can be seen at the top of the crash log.

Logfile:
https://paste.ee/p/Z7sJm

Thanks for your mod!

commented

Thank you for the lightening fast bugfix.

commented

Just as heads up. It is likely that this will break again in the future. Reflecting on internal code is really unstable as we will change it at any time.

Also AE2 is really not designed that an addon handles anything connection related like checking the security status or if it can connect. If a connection for whatever reason is not possible, IAppEngApi.createGridConnection() will simply thrown an exception.

commented

I don't really remember why i did it with reflection originally, there might have been some good reason for that originally :P

I've changed it now to catch the exception and relay the error to the player, we'll see if it breaks anything.

commented

Maybe because it did expose an internal exception?

No idea why it was not fixed way earlier. Probably because nobody ever asked why it does it.
I changed it for b12, so that it will only throw a subclass of FailedConnection, so it is also possible to distinguish between an already existing connection or different security realms. Will not work with rv2, but this at least it will throw a FailedConnection in case of different security realms or the internal one. Catching FailedException and then a wildcard Exception is probably still sufficient to support rv2 and rv3 for now.

Just to throw it in. Directly using WorldData is probably also a bad idea. Just access the instance provided via IAppEngApi. So you can support rv2 and rv3 with the same build.
As far as I remember the only potentially breaking change was changing the inscriber registry to return a Collection (immutable) instead of a List (mutable), still easily fixable by using Collection for both rvs.

commented

Maybe i'm blind but i don't see anything that returns IWorldData or IWorldPlayerData anywhere in IAppEngApi?

commented

IAppEngApi.registries().players()

commented

Ah ok, i'll change it, thanks for the help.