@@ -45,7 +45,6 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
45
45
float funnelEntry = segment + .5f ;
46
46
if (funnelState .getValue (BeltFunnelBlock .SHAPE ) == Shape .EXTENDED )
47
47
funnelEntry += .499f * (beltMovementPositive ? -1 : 1 );
48
-
49
48
boolean hasCrossed = nextOffset > funnelEntry && beltMovementPositive
50
49
|| nextOffset < funnelEntry && !beltMovementPositive ;
51
50
if (!hasCrossed )
@@ -73,9 +72,12 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
73
72
else
74
73
continue ;
75
74
75
+ if (beltInventory .belt .invVersionTracker .stillWaiting (inserting ))
76
+ continue ;
77
+
76
78
int amountToExtract = funnelBE .getAmountToExtract ();
77
79
ExtractionCountMode modeToExtract = funnelBE .getModeToExtract ();
78
-
80
+
79
81
ItemStack toInsert = currentItem .stack .copy ();
80
82
if (amountToExtract > toInsert .getCount () && modeToExtract != ExtractionCountMode .UPTO )
81
83
if (blocking )
@@ -92,14 +94,18 @@ public static boolean checkForFunnels(BeltInventory beltInventory, TransportedIt
92
94
return true ;
93
95
else
94
96
continue ;
97
+ else
98
+ beltInventory .belt .invVersionTracker .awaitNewVersion (inserting );
95
99
}
96
100
97
101
ItemStack remainder = inserting .insert (toInsert );
98
- if (toInsert .equals (remainder , false ))
102
+ if (toInsert .equals (remainder , false )) {
103
+ beltInventory .belt .invVersionTracker .awaitNewVersion (inserting );
99
104
if (blocking )
100
105
return true ;
101
106
else
102
107
continue ;
108
+ }
103
109
104
110
int notFilled = currentItem .stack .getCount () - toInsert .getCount ();
105
111
if (!remainder .isEmpty ()) {
0 commit comments