Right. If your original E30 engine is a 1.6, it'll be the M40 engine. You can take the sump off that, fit it to your E36 engine, and bolt the lump to your E30. However, you really need to make sure your E36 engine is an M42 (1.8 ) and not an M44 (1.9). If it's the latter engine then you're better off ditching the whole thing.
If you DO have an M42 engine, you'll still need E30-compatible intake and exhaust manifolds for your new engine. You can't take them off your old 8V engine and you can't knock them up with a mig welder. You'll also need the correct loom (you can butcher the E36 one, but it's fiddly.)
On the plus side, the E36 engine should bolt up to your existing M40 gearbox so you won't need to make your own prop.
For more info read this thread (which is a Sticky in the M40/M42 forum):
http://www.e30zone.net/modules.php?name ... c&t=159615