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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user