reworked how changes are propagated in the network

This commit is contained in:
Salomão
2021-07-16 14:13:48 -03:00
parent f9c274fb48
commit 24750f00b1
20 changed files with 591 additions and 618 deletions
@@ -264,7 +264,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
@Override
public void postChange( final IBaseMonitor<IAEFluidStack> monitor, final Iterable<IAEFluidStack> change, final IActionSource source )
{
if( source == this.source || source.machine().map( machine -> machine == this ).orElse( false ) )
if( this.source == source || this.source.machine().map( machine -> machine == this ).orElse( false ) )
{
try
{
@@ -272,8 +272,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
{
this.getProxy().getStorage().postAlterationOfStoredItems( AEApi.instance().storage().getStorageChannel( IFluidStorageChannel.class ), change, this.source );
}
}
catch( final GridAccessException e )
} catch ( final GridAccessException e )
{
// :(
}
@@ -415,7 +414,7 @@ public class PartFluidStorageBus extends PartSharedStorageBus implements IMEMoni
{
if( channel == this.getStorageChannel() )
{
final IMEInventoryHandler<IAEFluidStack> out = this.getProxy().isActive() ? this.getInternalHandler() : null;
final IMEInventoryHandler<IAEFluidStack> out = this.getInternalHandler();
if( out != null )
{
return Collections.singletonList( out );