infinite recursion in connect method
MaxKuz67 opened this issue ยท 3 comments
I don't know how to debug this, but some block causes infinite recursion and crash
The culprit is probably line 609 of AbstractSmallEngineBlockEntity.java. The condition for this line is:
if (level.getBlockEntity(getBlockPos().relative(facing)) instanceof AbstractSmallEngineBlockEntity be && be.getBlockState().getBlock() == this.getBlockState().getBlock()) {
If I understand correctly, this makes two blocks facing eachother connect to eachother - making long engines, but if you put two engines facing eachother, it will loop indefinetely.
A possible fix would be to make a check whether both engines are facing the same direction.