tweak cache reset on interface config
This commit is contained in:
@@ -304,17 +304,33 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||||||
if( te instanceof TileCableBus )
|
if( te instanceof TileCableBus )
|
||||||
{
|
{
|
||||||
IPart iPart = ( (TileCableBus) te ).getPart( this.getSide().getOpposite() );
|
IPart iPart = ( (TileCableBus) te ).getPart( this.getSide().getOpposite() );
|
||||||
if( iPart == null || iPart instanceof PartInterface )
|
if( iPart == null )
|
||||||
|
{
|
||||||
|
this.resetCache( true );
|
||||||
|
this.resetCache();
|
||||||
|
}
|
||||||
|
else if( iPart instanceof PartInterface )
|
||||||
|
{
|
||||||
|
if( createHandlerHash( te ) != handlerHash )
|
||||||
{
|
{
|
||||||
this.resetCache( true );
|
this.resetCache( true );
|
||||||
this.resetCache();
|
this.resetCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( te == null || te instanceof TileInterface )
|
}
|
||||||
|
else if( te == null )
|
||||||
{
|
{
|
||||||
this.resetCache( true );
|
this.resetCache( true );
|
||||||
this.resetCache();
|
this.resetCache();
|
||||||
}
|
}
|
||||||
|
else if( te instanceof TileInterface )
|
||||||
|
{
|
||||||
|
if( createHandlerHash( te ) != handlerHash )
|
||||||
|
{
|
||||||
|
this.resetCache( true );
|
||||||
|
this.resetCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.resetCache( false );
|
this.resetCache( false );
|
||||||
@@ -463,6 +479,15 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||||||
|
|
||||||
if( target.hasCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide ) )
|
if( target.hasCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide ) )
|
||||||
{
|
{
|
||||||
|
IStorageMonitorableAccessor accessor = target.getCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide );
|
||||||
|
if( accessor != null )
|
||||||
|
{
|
||||||
|
IStorageMonitorable inventory = accessor.getInventory( this.mySrc );
|
||||||
|
if( inventory != null )
|
||||||
|
{
|
||||||
|
return Objects.hash( target, inventory.getInventory( AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
return Objects.hash( target, target.getCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide ) );
|
return Objects.hash( target, target.getCapability( Capabilities.STORAGE_MONITORABLE_ACCESSOR, targetSide ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -214,7 +214,6 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
|
|||||||
|
|
||||||
if( pos.offset( updateFromFacing ).equals( neighbor ) )
|
if( pos.offset( updateFromFacing ).equals( neighbor ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
TileEntity te = w.getTileEntity( neighbor );
|
TileEntity te = w.getTileEntity( neighbor );
|
||||||
Object capability = null;
|
Object capability = null;
|
||||||
if( te != null )
|
if( te != null )
|
||||||
|
|||||||
Reference in New Issue
Block a user