BuildCraft version: buildcraft-all-184.108.40.206
Forge version: 1.12.2--220.127.116.1138
Link to crash report or log: ~~~
Singleplayer or multiplayer: Only multiplayer
Steps to reproduce: Place a vanilla furnace, NC machine or any other TE which has two or more separate blocks for different 'states' adjacent to a BC pipe, and restart the server. After rejoining, trigger a block update, e.g. by putting fuel in the furnace, or activating the NC machine with redstone, etc, and the tile entity will be completely refreshed, deleting all previous information.
Additional information: May be related to #4439, but can't be sure.
The cause of this seems to be this line here. When the block changes, the method assumes that the TE has changed too, and the call to create a new TE deletes the old one. I understand that it is now common practise to use the same block and switch between meta states, but some TEs still don't do this. A possible solution might be to check if TileEntity::shouldRefresh(...) is true before recreating the TE :)
The text was updated successfully, but these errors were encountered:
Hmm, I see. I think the chunk TE map is exposed, so perhaps something can be done with that? The stack trace was generated when the NC processor block's createNewTileEntity(...) was called, here it is :)
It looks like the issue is that I was assuming that the Chunk always had all of it's tile entities, but that turns out to not be the case if a tile entity is added to the world while it is processing loaded tiles.
So I guess the fix is to always go the slow route (asking the world instead of the chunk).