Create: The Factory Must Grow

Create: The Factory Must Grow

4M Downloads

infinite recursion in connect method

MaxKuz67 opened this issue ยท 3 comments

commented

I don't know how to debug this, but some block causes infinite recursion and crash

crash-2025-08-02_19.59.14-client.txt

commented

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.

commented

A possible fix would be to make a check whether both engines are facing the same direction.

commented

is there a way i can replicate it?