public static MineralLayer GetMineralLayerOrThrow(this ITerrain terrain, MaterialType type)
 {
     return(terrain.GetMaterialLayer(type).ThrowIfNotType <MineralLayer>(ErrorCodes.NoSuchMineralOnZone));
 }