Sync up rv0 branch fixes into rv1
This commit is contained in:
+2
-2
@@ -286,7 +286,7 @@ public class GridNode implements IGridNode, IPathItem
|
||||
}
|
||||
catch (FailedConnection e)
|
||||
{
|
||||
TickHandler.instance.addCallable( new Callable() {
|
||||
TickHandler.instance.addCallable( node.getWorld(), new Callable() {
|
||||
|
||||
@Override
|
||||
public Object call() throws Exception
|
||||
@@ -321,7 +321,7 @@ public class GridNode implements IGridNode, IPathItem
|
||||
}
|
||||
catch (FailedConnection e)
|
||||
{
|
||||
TickHandler.instance.addCallable( new Callable() {
|
||||
TickHandler.instance.addCallable( node.getWorld(), new Callable() {
|
||||
|
||||
@Override
|
||||
public Object call() throws Exception
|
||||
|
||||
Vendored
+6
@@ -113,8 +113,14 @@ public class TickManagerCache implements ITickManager
|
||||
sleeping.remove( node );
|
||||
awake.put( node, tt );
|
||||
|
||||
// configure sort.
|
||||
tt.lastTick = tt.lastTick - tt.request.maxTickRate;
|
||||
tt.current_rate = tt.request.minTickRate;
|
||||
|
||||
// prevent dupes and tick build up.
|
||||
upcomingTicks.remove( tt );
|
||||
upcomingTicks.add( tt );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class StorageInterestManager {
|
||||
|
||||
private final SetMultimap<IAEStack, ItemWatcher> container;
|
||||
private LinkedList<SavedTransactions> transactions = null;
|
||||
private int transDepth=0;
|
||||
|
||||
public StorageInterestManager(SetMultimap<IAEStack, ItemWatcher> interests) {
|
||||
container = interests;
|
||||
@@ -32,20 +33,28 @@ public class StorageInterestManager {
|
||||
|
||||
public void enableTransactions()
|
||||
{
|
||||
transactions = new LinkedList();
|
||||
if ( transDepth == 0 )
|
||||
transactions = new LinkedList();
|
||||
|
||||
transDepth++;
|
||||
}
|
||||
|
||||
public void disableTransactions()
|
||||
{
|
||||
LinkedList<SavedTransactions> myActions = transactions;
|
||||
transactions = null;
|
||||
|
||||
for ( SavedTransactions t : myActions )
|
||||
transDepth--;
|
||||
|
||||
if ( transDepth == 0 )
|
||||
{
|
||||
if ( t.put )
|
||||
put( t.stack, t.iw );
|
||||
else
|
||||
remove( t.stack, t.iw );
|
||||
LinkedList<SavedTransactions> myActions = transactions;
|
||||
transactions = null;
|
||||
|
||||
for ( SavedTransactions t : myActions )
|
||||
{
|
||||
if ( t.put )
|
||||
put( t.stack, t.iw );
|
||||
else
|
||||
remove( t.stack, t.iw );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user