@@ -45,7 +45,6 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
4545 float funnelEntry = segment + .5f ;
4646 if (funnelState .getValue (BeltFunnelBlock .SHAPE ) == Shape .EXTENDED )
4747 funnelEntry += .499f * (beltMovementPositive ? -1 : 1 );
48-
4948 boolean hasCrossed = nextOffset > funnelEntry && beltMovementPositive
5049 || nextOffset < funnelEntry && !beltMovementPositive ;
5150 if (!hasCrossed )
@@ -73,9 +72,12 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
7372 else
7473 continue ;
7574
75+ if (beltInventory .belt .invVersionTracker .stillWaiting (inserting ))
76+ continue ;
77+
7678 int amountToExtract = funnelBE .getAmountToExtract ();
7779 ExtractionCountMode modeToExtract = funnelBE .getModeToExtract ();
78-
80+
7981 ItemStack toInsert = currentItem .stack .copy ();
8082 if (amountToExtract > toInsert .getCount () && modeToExtract != ExtractionCountMode .UPTO )
8183 if (blocking )
@@ -92,14 +94,18 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
9294 return true ;
9395 else
9496 continue ;
97+ else
98+ beltInventory .belt .invVersionTracker .awaitNewVersion (inserting );
9599 }
96100
97101 ItemStack remainder = inserting .insert (toInsert );
98- if (toInsert .equals (remainder , false ))
102+ if (toInsert .equals (remainder , false )) {
103+ beltInventory .belt .invVersionTracker .awaitNewVersion (inserting );
99104 if (blocking )
100105 return true ;
101106 else
102107 continue ;
108+ }
103109
104110 int notFilled = currentItem .stack .getCount () - toInsert .getCount ();
105111 if (!remainder .isEmpty ()) {
0 commit comments