Is QgsMapLayerRegistry removed in QGIS3?

Yes it has been removed, but alternatives exist.

Changes of the 3.0 API are listed here:

https://qgis.org/api/api_break.html

QgsMapLayerRegistry: Its functionality has been moved to QgsProject.

The main reason is, that QgsMapLayerRegistry is/was a singleton and therefore only a single registry could ever exist. With this constraint removed, major roadblocks are out of the way to implement new things like having multiple projects open side-by-side.


You can do the same thing easily just do:

 QgsProject.instance().addMapLayer(your_Qgs_whaterver_Layer)

for more details, see the following:

https://qgis.org/api/classQgsProject.html#a322fce15a4dd7505398ef9d24295f0c1