Project Red - Fabrication

Project Red - Fabrication

19M Downloads

NullPointerException while updating feedback light button

Maxiebyte opened this issue ยท 2 comments

commented

NullPointerException while destroying and placing feedback light buttons fast.
Video: http://www.mediafire.com/download/chrebcfzn4h37d1/Minecraft__00000.webm
Crash Report: http://www.mediafire.com/view/pe8ia83s5a0jsl6/crash-2014-07-09_18.13.17-server.txt
Minecraft version: 1.7.10
Minecraft Forge + FML version: 10.13.0.1177
ProjectRed version: 4.4.5.44
Forge Multipart version: 1.1.0-296-universal

commented

The problem is that the block is being placed/broken quicker than the tile entity can initialize.
Not sure whether this can be fixed, not worth checking the world variable is not null everywhere.
Edit
Should probably fix. Only one null check needed

commented

Mind you this only seems to happen with feedback light buttons. Can't get it to crash with normal light buttons.
Edit
Happens to feedback buttons because they have a onNeighborChanged

Edit again
The real reason for this is because onNeighborChanged calls its super method which called dropIfCantStay. The button can't stay so drops meaning the tile = null and so the world = null

It's not breaking the button quickly that causes it, rather placing the button and quickly breaking the block it's placed on.