else if ( te instanceof IUpgradeableHost )
upgrades = ((IUpgradeableHost) te).getInventoryByName( "upgrades" );
if ( upgrades != null && is != null && is.getItem() instanceof IUpgradeModule )
{
IUpgradeModule um = (IUpgradeModule) is.getItem();
Upgrades u = um.getType( is );
if ( u != null )
{
InventoryAdaptor ad = InventoryAdaptor.getAdaptor( upgrades, ForgeDirection.UNKNOWN );
if ( ad != null )