MineColonies

MineColonies

53M Downloads

Baker update - Ray issues

H3roDude opened this issue ยท 8 comments

commented

Baker is working after restart but client crashed!
Minecraft version 1.10.2
minecolonies-universal-1.10.2-0.8.3524

latest.zip
scroll down for the crash :)

Many greetings
~H3ro

commented

Hey @H3roDude does this client exception happen repeatably?

commented

@cltnschlosser I found this on line 85, that shouldn't be the issue but it seems strange:

        FMLClientHandler.instance().getClient().effectRenderer.addBlockHitEffects(message.pos, EnumFacing.getFront(message.side));

Why getting the front of the side? We should get the front of the metadata, no?
Still, it shouldn't throw a nullpointer exception, I'm really interested to know if this happens reproducible or is a 1-time thing.

commented

Its crashing all the time when the baker starts working again, like 5-6sec after repairing and fixing him

commented

Funny thing the crash that crashes your client seems to be a different mod: SpiceOfLife. Can you try it without?

commented

@H3roDude did you try it without?

commented

I think the game was crashing and this was happening in the network thread, so something was null (deallocated). Doesn't look like it is our fault. Although I wonder if that code needs to be run in the main thread...

I think the idea with EnumFacing.getFront(message.side) was to get the outside face of the side that was interacted with, so that we could put the particles there.

commented

@cltnschlosser Yes any interaction with the world has to run on the main thread. In vanilla minecraft there is no real multithreaded networking anyway, forge allows this however. When we try to interact with anything in vanilla Minecraft (which the world belongs to, hence 99% of the messages that come in, have to be delegated to the Main Thread) we can not use anything else but the Main thread for that reason it will just plain crash the game.

commented

Yeah we probably should move this code outside of the network thread, we have some functionality in the other messages as well, are you able to do that @cltnschlosser ?