Fixes #2043: Storage buses updates should happen in the correct order.

This is loosely based on #2032 and should prevent any duplicated event,
but still does a refresh the whole cache due to potentially issues with
some inventories.

It also ensures that storage buses will not announce a CellArrayUpdate
before they are fully initialized, thus no longer causing them to return
null during an update.

Fixes #2403
This commit is contained in:
yueh
2015-12-27 16:14:11 +01:00
parent 977c9ea70f
commit 927ecc015b
2 changed files with 276 additions and 88 deletions
@@ -408,16 +408,6 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
return this.handler;
}
try
{
// force grid to update handlers...
this.getProxy().getGrid().postEvent( new MENetworkCellArrayUpdate() );
}
catch( final GridAccessException e )
{
// :3
}
this.handlerHash = newHandlerHash;
this.handler = null;
this.monitor = null;
@@ -500,6 +490,16 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
}
}
try
{
// force grid to update handlers...
this.getProxy().getGrid().postEvent( new MENetworkCellArrayUpdate() );
}
catch( final GridAccessException e )
{
// :3
}
return this.handler;
}