TileEntity creation race condition.
RogueLogix opened this issue ยท 5 comments
related: BiggerSeries/BiggerReactors#24
This line can cause a tile entity to be created when it probably shouldn't be, and a ConcurrentModification exception gets thrown in some cases as a result.
https://github.com/XFactHD/FramedBlocks/blob/1.16.x/src/main/java/xfacthd/framedblocks/client/util/mixin/MixinBlock.java#28
I will look into it when I am home.
In theory this should be preventable by first checking if the BlockState at that position is mine but that might still crash if someone builds a structure with a lot of Framed Blocks. Using the getTileEntity overload (in World if it exists or else in Chunk) that takes a "TileEntity creation type" and passing CHECK might be my best bet.
If you have any feedback in regard to this solution or any other hints, that would be greatly appreciated.
looks like you have a check there that disregards the TE check if its your blockstate, that may be a typo. setting to to CHECK was the immediate solution i thought of before even seeing your mixin.
The existing BlockState check is for the Block that is checked. The TileEntity after that is the neighbor to that block.
Fixed in 2bb44a0